Hi,
Today I've downloaded a fresh copy of Flash Builder Standalone, with Flex v4.1 coming installed with it. I'm trying to add OSMF swc to my existing project, but I keep running across the following errors:
1046: Type was not found or was not a compile-time constant: DRMAuthenticationCompleteEvent.
1046: Type was not found or was not a compile-time constant: DRMAuthenticationErrorEvent.
1046: Type was not found or was not a compile-time constant: DRMErrorEvent.
1046: Type was not found or was not a compile-time constant: DRMStatusEvent.
1046: Type was not found or was not a compile-time constant: NetGroup.
Again, this is a brand new install from a download today of the latest version of Flash Builder. It contains only Flex 3.5 and 4.1.
I've set these values per instructions in OSMF 1.5 Release Notes s03.pdf:
What other information can I provide?
It is not, it's a normal flex app. I thought it might be because the projects were older ones and perhaps they pointed to some other playerglobal.swc in their .actionscriptProperties file, but I have created a new project and added simple code and I still see the same issue.
I've been able to reproduce quite quickly with a fresh install of Flex Builder.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import org.osmf.media.DefaultMediaFactory;
import org.osmf.media.MediaFactory;
var mediaFactory:MediaFactory = new DefaultMediaFactory()
]]>
</fx:Script>
</s:Application>
When I try to compile this, I cannot because of the errors I've listed above. I'm using flex 4.1, and this happens regardless of how I set the compatibility mode. Thoughts?
Can be found here: http://benporterfield.com/player.fxp
Let me know if you need it in another format.
If you haven't done so, please make sure the project is compiled with approproriate SDK. You seemed already checked this however, mentioning this again because I have seen this before. The case was the project automatically set to Flex SDK 3.5 when imported or created.
After changing to Flex SDK 4.0 the compiler error has gone.
Go to properties of the application that throws the compiler errors. Go to Actionscript Compiler > Flex SDK version > Select Use Default SDK (currently "Flex 4.0/4.1") (or you can use a specific SDK for the right one.
If it doesn't solve this, yes please send the project files to Wei.
Ryan
Thanks Ryan and Wei for the responses. I've attached a link to download the exported project in a comment above.
In the case of the project I sent, I have not messed with the flex sdk it uses, it's still set to the default for a new project that is set when you first in stall Flash Builder, which appears to be Use Default SDK (4.1).
Anything else I can do to assist?
For using FlashPlayer 10.1 features like DRM, with the latest Flash Builder 4 and Flex 4.1 SDK you need to follow these steps:
1. Go to project Properties for OSMF
2. Select Flex Library Compiler
3. Verify that you use Flex 4.1 (i can see that you already do)
4. Select 'Use specific version' and set it to 10.1.0
5. Additional compiler arguments:
-define CONFIG::LOGGING true -define CONFIG::FLASH_10_1 true
(having logging set to true is always handy for troubleshooting).
If you use StrobeMediaPlayback, OSMFPlayer or a custom player, you need to have the settings above match.
You might need to check this for any other OSMF plugins, or samples that you use.
Hope this helps,
Andrian
This does resolve the issue! Although, I'm not modifying project properties for OSMF, I'm modifying the project that is including the OSMF swc.
I would suggest making this much clearer in the OSMF instructions. Nowhere in the instructions does it explain to set the Flash Player to 10.1 (in fact, it states clearly to set it to 10.0) or add these config options. It states that it will work with any version of Flex, which is not true when using the latest version of Flash Builder without these additional undocumented steps.
Thanks for all the quick responses to help me find the fix.
Hi Ryan,
Does DynamicStreamingSample require FP 10.1?
In order to successfully import that project into Flash Builder, I did need to follow the steps in Andrian's post to clear errors. Steps including the changes setting 'Use specific version' to 10.1.0.
Another issue that may need to be addressed in that project (readme.txt or otherwise), is that after following the steps in Andrian's post I also needed to clear further errors by making the following changes in DynamicStreamingSample.css (in 2 instances of @font-face {}):
FROM:
src: local("Verdana");
To:
src: url("C:/WINDOWS/Fonts/verdana.ttf");
I made the changes above after the compiler returned the following error (2 instances):
Resource
DynamicStreamingSample.css
Description
exception during transcoding: Cannot embed local font 'Verdana' as CFF. The CSS @font-face 'local()' syntax is not supported. Please specify a path directly to a font file using the 'url()' syntax. For [Embed] syntax the 'systemFont' attribute is not supported. Please specify a path directly to a font file using the 'source' attribute.
Path
/DynamicStreamingSample/src
Location
line 23
Type
Flex Problem
Hello to the forum,
I am trying to recreate examples based on:
http://cookbooks.adobe.com/post_Playing_Multiple_Pieces_of_Media__Conc urrently__wi-17640.html?w=rel
I have downloaded the OSMF.swc and placed it in the proper libs folder.
I publish the example and get:
1046: Type was not found or was not a compile-time constant: DRMAuthenticationErrorEvent.
1046: Type was not found or was not a compile-time constant: DRMAuthenticationCompleteEvent.
1046: Type was not found or was not a compile-time constant: SystemUpdater.
1046: Type was not found or was not a compile-time constant: SystemUpdater.
1046: Type was not found or was not a compile-time constant: DRMErrorEvent.
1046: Type was not found or was not a compile-time constant: DRMStatusEvent.1046: Type was not found or was not a compile-time constant: DRMStatusEvent.
(there are two flvs in the example)
On the publish tab, following the previous instructions on these forum posts I have added at
FLASH:SETTINGS:CONFIG CONSTANTS:
CONFIG::LOGGING true
CONFIG::FLASH_10_1 true
yet I still get the above errors. I am interested in exploring OSMF, but this issue is preventing me.
(On this workstation I have WIN XPSP3 and I have Flash CS4 with Flash Player 10,0,2,54 and debug player YES, with all other constants YES.)
Please advise,
Gregg Di Lorenzo
Greg h,
I don't think DynamicStreamingSample app requires 10.1 compilation however, indeed, css syntax may have changed from FB3 to FB4 as I also see them in a couple sample apps in FB4. We are in the process of converting the sample apps from FB3 to FB4, so they will be addressed. Thanks for bring that up!
Greggdilorenzo,
If I am reading right, you are using Flash CS4? I assuemed you've downloaded the lastest OSMF.swc posted.
I would suggest to update playerglobalr.swc and your FP to the latest (10.1) to see that resolves the compilation.
Ryan
Hello Ryan,
Thank you for the quick follow up.
Yes I updated all the swc's and I am using Flash CS4 with the very latest Flash Player: Version 10,2,161,22.
Any further ideas, FYI: I just cleared all caches, tried to reintall the player from adobe.com, and it says "you already have the latest version".
I would really like to start experimenting with OSMF.
Gregg
One more note - as far as playglobalr.swc see:
http://forums.adobe.com/thread/423432
I tried once more to reinstall everything, and even contacted rblank.com,
still no resolution.
A little frustrating because this framework seems so promising and is just what I am looking for.
If any one has any further ideas, please reply.
Thanks,
Gregg
I've been experiencing similar problems with an identical list of errors. Downloading the Flex 4.1 SDK and compiling against that made the problem go away... though I think it could be helpful to have some basic prerequisites documented on the Strobe Media Playback source download page (i.e FP 10.1 and SDK 4.1 required)
I just upgraded to OSMF 1.5 in Flash Builder CS5 using the 4.1 SDK with the latest production build and got the same errors. I added the CONFIG::FLASH_10_1 compile argument and it resolved the problem - but I'm a little annoyed that by even setting the specific version to 10.1.0 it still required the argument. Is this something that will be required in future versions of the OSMF.swc?
North America
Europe, Middle East and Africa
Asia Pacific