Jai’s Weblog – Tech, Security & Fun…

Tech, Security & Fun…

  • Jaibeer Malik

    Jaibeer Malik
  • View Jaibeer Malik's profile on LinkedIn
  • Subscribe

  • Feedburner

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 29 other followers

  • Archives

  • Categories

  • Stats

    • 379,210
  • Live Traffic

Tips&Tricks: Include SpringActionscript application context file in swf file

Posted by Jai on August 18, 2009

There are multiple ways to include the application context file in swf file.


[Embed(source="application-context.xml", mimeType="application/octet-stream")]
        public class EmbeddedContext extends ByteArray {
        public function EmbeddedContext() {
                super();
            }

            public function get content():XML {
                return new XML(readUTFBytes(length));
                }
        }

 _applicationContext=new FlexXMLApplicationContext();
                _applicationContext.addConfig(new EmbeddedContext().content);
                _applicationContext.addEventListener(Event.COMPLETE, onApplicationContextComplete);
                _applicationContext.load();

Another way is to directly use the _applicationContext.addEmbeddedConfig(configClass).

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

 
%d bloggers like this: