We're hoping to have good instructions and some supporting classes for
this around the time that CS3 ships.  It is admittedly too difficult
especially with the Preview.
 
Matt

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Parker
Sent: Thursday, March 22, 2007 10:25 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Adding Flash Library items to a Flex App



Ok, this should be simple but like all things critical to my flash
projects they end up being hacks or major work-arounds. Essentially, I
need to add a Flash Library item (set to export as a default class in
Flash 9 Preview) - to my Flex application. I won't go into why but just
consider the need for Flash interface for graphics creation a
requirement for now. Seeing as this was no big deal (attachMovieClip in
as2) before how would i go about this in as3/Flex? Please provide
example - not just theory, if you can as I've almost read every
theory/method out there but no up to date examples and nothing my
designer brain can grasp. 

Here's what im doing so far. 
- Created a flash movie with a graphic movieclip set to export on first
frame / class name as default of name of movieclip - this object doesn
not live on stage but in the library (unless the workflow needs to
change but i'd rather it not as there will be other objects to load in
as well) 
- Using the Image class to load in swf. All is good so far. 
- So how do actualy add a child of this swf (one of the classes compiled
in this swf) to a member of my Application? 

Heres what i was thinking i could do - 

var myLibObject:Image = new Image();
myLibObject.source = "packages/MyLibrary.swf";
myCanvas.addChild(myLibObject.Circle); // Circle is a library item/class
in the flash library / Obviously this doesn't work but not sure how
classes within the flash document class are referenced 

 

Reply via email to