Header Image - charles newman's blog

Category Archives

30 Articles

Flex Builder Warning – “Source path entry, …, is a subdirectory of source path entry”

by Charles Newman

If you have two Flex projects sharing the same parent folder like this:

/Users/your-name/Documents/your-dev-path/ProjectOne

/Users/your-name/Documents/your-dev-path/ProjectTwo

and ProjectTwo refers to ProjectOne in the “Flex Build Path” settings, you’ll get this warning:

Source path entry, ‘/Users/your-name/Documents/your-dev-path/ProjectOne’, is a subdirectory of source path entry, ‘/Users/your-name/Documents/your-dev-path/ProjectTwo/src’.

I don’t know about you, but compile warnings really bug me.  If there is really a problem, I’ll address it directly, but in this case, there is nothing wrong. So to remove this warning from your build, add this to your compile settings:

-allow-source-path-overlap=true

OSMF – Sprint 11 release now available (aka “FC1”)

Sprint 11 is the feature complete release of OSMF.  Lots of bugs were fixed for this release including the bug I mentioned in the Sprint 10 release blog post below about the MAST plugin and the SMIL plugin not working together.  In fact, in the AkamaiPluginSample all of the plugins are working nicely together.  This sample app has become the sample for demonstrating many of the OSMF plugins that reside in the OSMF repository.

For more details on this release, see this blog entry:

http://blogs.adobe.com/osmf/2010/04/osmf_fc1_released.html

OSMF – Sprint 10 release now available for download

If you’ve been waiting for OSMF (Open Source Media Framework) to settle down, now is the time to dive in. This sprint was largely about locking down the API, but we added a few features as well:

  • DVR Support. OSMF now supports DVR via Flash Media Server’s server-side DVRCast application. This feature allows clients to jump back in time while viewing a live stream.
  • Syndication support (Atom 1.0, RSS 2.0, plus iTunes and Media RSS extensions).  You’ll see a new AS3 library in OSMF that can parse all of the major feed formats, plus the media-centric RSS extensions.  I’ve also updated the Akamai Plugin Sample app to load and parse an RSS feed and display a playlist.  If you load the MAST plugin before loading the RSS feed, you get a pre-roll ad before each video in the playlist. Note there is a bug with the MAST plugin and the SMIL plugin working together, I’m hoping to address this ASAP.
  • Extended HTTP Streaming Support. OSMF now supports subclips for HTTP-streamed content, and DRM for HTTP-streamed content.

See the OSMF blog post here for more details on these features:

http://blogs.adobe.com/osmf/

As usual, if you have questions, you can post them to the OSMF forums:

http://forums.adobe.com/community/opensource/osmf/

Flex Builder 3 – How to get rid of the annoying unused CSS styles warning

by Charles Newman

If you like to use one CSS file in lots of different Flex projects you’ve probably seen an annoying warning message similar to this one:

“The CSS type selector ‘ComboBox’ was not processed, because the type was not used in the application. ”

This warning will appear at compile-time if you don’t have a ComboBox in your app, for example.  I like to put lots of styles in a few CSS files and reuse them, but I really don’t need this information. So the way to get rid of these warnings is to add this line to your “Additional compiler arguments” in the “Flex Compiler” section of your project’s properties:

-show-unused-type-selector-warnings=false

OSMF – Sprint 9 release now available for download

The latest release of OSMF is now available here:

http://opensource.adobe.com/wiki/display/osmf/Downloads

This is the work we did for Sprint 9, which concluded on January 20th. There are quite a few changes to the API and you can read the release notes for the specific changes.  The release notes have detailed descriptions of the API changes and should ease your pain when compiling your player against this new release.

Some of the new features in this release include:

See the OSMF blog post here for more details on these features:

http://blogs.adobe.com/osmf/

We are currently heads down on Sprint 10, which will wrap up on February 24th.

As usual, if you have questions, you can post them to the OSMF forums:

http://forums.adobe.com/community/opensource/osmf/

Adobe Flash – Flash Player 10 is at 93.5% penetration

As of September 2009, Flash Player 10 is installed on 93.5% of the personal computers in mature markets. This includes the US, Canada, UK, Germany, France, Japan, Australia, and New Zealand.

All the projects I work on target Flash Player 10 or higher, and I can’t keep count of how many times developers have asked me, “how can I make this code work with Flash Player 9”. Simple answer, you can’t, so stop asking ;)

Details are here:
Worldwide Ubiquity of Adobe Flash Player by Version

Adobe Flex – getDefinitionByName failing with Error #1065

by Charles Newman

I was trying to instantiate a class using the class name as a string, like this:

var pluginInfoRef:Class = getDefinitionByName(“com.foo.bar.MyClassName”) as Class;

But kept getting this error:

ReferenceError: Error #1065: Variable MyClassName is not defined.

Which really has nothing to do with the problem since “MyClassName” is not a variable.  I think the problem here is the SWF compiler in Flex Builder is optimizing out any imports that don’t get instantiated, so at run-time, the class really doesn’t exist in the SWF. The work around I came up with is to add this line:

private static const forceReference:MyClassName = null;

This causes the SWF compiler to pull the class into the SWF and getDefinitionByName started to work.  Now, I’d like to have that 20 minutes back.