I'm actually trying to do something similar.  What I've found so far should be able to help you.  You need to load the SWF via the Loader component and then use its content property:

<mx:Loader id="myloader" source=" SimpleSWF.swf" complete="onComplete()"/>

private function onComplete(): void
{
   var swf: MovieClip = MovieClip(myloader.content);
   swf.gotoAndPlay(...);
}

My problem is that I can't access additional methods/properties that are declared in the loaded swf.  I've seen a Flex 1.5 example where you can just go ahead and call those methods on the MovieClip instance, but that doesn't seem to work in Flex 2.  I've tried casting it to an Object to get around the compiler, but I just end up with a runtime error.


On 2/8/06, nacho <[EMAIL PROTECTED]> wrote:
what I want to do is load a .SWF file and control the timeline of this movieclip, with gotoAndPlay, etc...
but i don't know how to load it



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to