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

March 3rd, 2010

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

cpnewman Adobe Flex

SVN – How to determine the server version

February 17th, 2010

There is an easy way to figure out what version of SVN is running on the server (the repository).  Just copy and paste the http or https address you use for your “svn checkout” into a web browser and you’ll see the server version in the footer of the html page.

So for example, you can see the OSMF repository is running Subversion 1.6.3 by pasting this URL into your browser:

http://opensource.adobe.com/svn/opensource/osmf/

OSMF-svn-repository

And OVP on Sourceforge.net:

https://openvideoplayer.svn.sourceforge.net/svnroot/openvideoplayer/

OVP-svn-repository

cpnewman Subversion

OSMF – Sprint 9 release now available for download

February 4th, 2010

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/

cpnewman Adobe Flash, Adobe Flex, OSMF (Open Source Media Framework)

Mac OS X – Rename a bunch of files quickly

December 18th, 2009

Let’s say I have a bunch of files with the extension “.abc” and I want to change all of them to end with “.doc”.  I can rename each one individually in the Finder, but that could take a long time if there are a lot of files.  Especially considering the warning the Finder gives you about changing the file extension.

A much faster way to do it is to launch the Terminal application, “cd” to the directory where your files exist, and use this command:

for f in *.abc; do mv ./”$f” “${f%abc}doc”; done

All of  your “*.abc” files will be changed to “*.doc”.

cpnewman Mac OS X

Adobe Flash – Flash Player 10 is at 93.5% penetration

December 3rd, 2009

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

cpnewman Adobe Flash, Adobe Flex

OSMF – User Group Session, Intro to OSMF

November 21st, 2009

Brian Riggs, tech lead for the OSMF (Open Source Media Framework) project gave a nice overview of the framework this past Thursday. You can view the recorded Acrobat Connect session and check out lots of helpful links here:

http://groups.adobe.com/posts/010fc1b635

cpnewman Adobe Flash, Adobe Flex, OSMF (Open Source Media Framework)

Facebook – maximum picture size

November 19th, 2009

If you are uploading pictures to Facebook, the largest dimension (either width or height) is 604 pixels. If you upload a picture with a width or height larger than that, Facebook will resize it, maintaining the aspect ratio, but who knows what algorithm they are using to do that.

If you want the best quality photo, load your photo into Photoshop, make the largest dimension 604 pixels, save it, and then upload it to Facebook.

cpnewman Facebook

Adobe AIR 2 beta is now publicly available on Adobe Labs

November 16th, 2009

AIR 2 runtime and SDK available for download here:
http://labs.adobe.com/technologies/air2/

cpnewman Adobe AIR

OSMF Cue Points

November 12th, 2009

Check out my post on the OSMF (Open Source Media Framework) blog about the new cue point feature in OSMF:
http://blogs.adobe.com/osmf/2009/11/cue_point_support_in_osmf.html

cpnewman Adobe Flash, Adobe Flex, OSMF (Open Source Media Framework)

Adobe Flex – getDefinitionByName failing with Error #1065

September 23rd, 2009

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.

cpnewman Adobe Flex