What you're doing is a little odd, but you can build your own version of
the MovieClipLoaderAsset class (which is what is used to do embedding of
visual SWFs).
 
Basically, embed the RSL SWF using
 
[Embed(source='as3rsl.swf', mimeType='application/octet-stream')]
public class MyBinaryBlob extends ByteArray {}
 
and then use Loader.loadBytes to dynamically load the SWF out of the
binary blob.  From there, use getDefinition as you describe.
 
-rg


________________________________

        From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Freer
        Sent: Sunday, February 18, 2007 3:19 PM
        To: flexcoders@yahoogroups.com
        Subject: [flexcoders] Flash 9 swf as RSL
        
        

        Hey Guys,
        
        I am trying to embed a Flash 9 compiled AS3 swf into a Flex 2
app. Once the flash swf is loaded into the Flex app I want access to all
the exported library items and there associated classes.
        
        I have successfully achieved loading an AS3 swf into a Flex 2
app at runtime via the loader class. Through using a combination of
setting the context.applicationDomain and
applicationDomain.getDefinition(), I am able to successfully create
instances of the swf library objects
        
        However I want to achieve this NOT at runtime but by embedding
the swf into the Flex app. 
        It seems logical to me that this would be possible using a RSL -
but so far no joy.
        
        Has anyone done this?
        
        Cheers
        Matt
        

         

Reply via email to