Alter the properties of the SWF


Did you know that we can alter the properties of the output SWF of Flex.
The can be done like this:
In a Flex project the application class:

</mx:Metadata>
[SWF(width=”500″, height=”500″, frameRate=”30″, backgroundColor=”#FFFFFF”)]
</mx:Metadata>

and in an actionscript project , the code should be like this:
package
{
   [SWF(width=”500″, height=”500″, frameRate=”30″, backgroundColor=”#FFFFFF”)]
   public class MyClass
   {

    }

I found it handy inorder to fix a problem I encountered in one of our projects. This might not be used quite often, but it is worth knowing…. 🙂

Advertisements

Published by

Sunil Nair

I am a Software Developer currently working on developing Rich Internet Applications using Adobe Flex/AIR. I have had diverse experience of developing application in software industry for the last 4 years.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s