Ben, We ran into the same problem with Embedded clips and couldn't find a solution. However, if you save as an AS3 SWF through Flash 9 alpha, and then load the clip dynamically you will get a MovieClip back. Then use getChildren to pull out any subclips you need access to, as you described.
If you save it as a Flash 8 SWF (AS2) and load that you get a AVM1Movie. Still a display object but very restricted what you can do with it. It seems basically you can play it and that's all--so it's more like an animated GIF than something from Flash. Best to stick to Flash 9 (AS3) SWF's. Doug -----Original Message----- From: ben gomez farrell [mailto:[EMAIL PROTECTED] Sent: Thursday, March 29, 2007 1:03 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Confused about accessing nested movieclips in AS3 I just figured it out, but now I have a new question. There's actually no code except for stop(); and the instantiation code in the actual Flash file. I took all this out, and it doesn't seem like a big deal to just convert the code. It's also a small project, so it's not going to be a big deal to change some of the syntax and type all my variables. I actually am upgrading because I want to use the byteArray class to save out a JPG. Anyway, I've gotten so far as to finally figure out that I need to access the nested clips through the displayobject class by using getChildren, or getChildAt, or getChildByName. My battle now is that I can't figure out why things are embedding the way they are. I'm embedding the assets through a compiler directive: [Embed(source="assets.swf", symbol="gui_mc")] Even though it's a movieclip in the Flash Alpha, it won't type in the Flex SDK as a movieclip. The error says it's displayobject. I can actually get away with typing it as a Sprite. And then I can access it's children if I say if I type the main movieclip as a sprite. The nested clips on the other hand I can't type as anything but a display object unfortunately, which means I can't access it's frames. So that's what I'm clueless on now! I've tried exporting out of Flash Alpha as AS2 and AS3, but I can't type things as a movieclip no matter what I do. Thanks! ben Steven Sacks | BLITZ wrote: > If you're not using absolute strict typing and everything that AS3 has > (display, addChild, etc.), then you're gaining no benefit because > Flash will just kick down to VM1. > > IMO, you should either rebuild it from scratch in AS3 style (using > sprites, display objects, etc.) or leave it as AS2 and save yourself > the headache. > > > > > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of ben >> gomez farrell >> Sent: Thursday, March 29, 2007 11:32 AM >> To: Flashcoders mailing list >> Subject: [Flashcoders] Confused about accessing nested movieclips in >> AS3 >> >> Hey everyone, I've been working with AS3 for a bit, and been kind of >> avoiding this problem till now, but I've converting an AS2 project >> which has some nested clips, and I'd rather not change things! >> >> So basically the question is how do I access nested clips? >> Before in AS2, I'd say myclip.nestedclip.othernestedclip. >> >> But now the problem I have is that once I get a clip on stage I can't >> drill down to it's children with dot syntax. It gives an error that >> the nested MC is an undefined property. >> I suppose I could create a class for myclip that exposes it's nested >> clips as public variable - and do that for each nesting level, but >> that's a lot of work. >> >> I also tried declaring it in my main class as private var >> myclip.nestedclip:MovieClip, but of course that's bad syntax. >> >> If it matters, I'm exporting my assets out of the Flash 9 Alpha as a >> Flash 9 AS2 movie. (I tried AS3, but the ability to specify a linkage >> ID went away). Then I'm embedding the movieclips I need with the >> [Embed] tag through FlashDevelop and sending it over to the Flex 2 >> SDK compiler for output. >> >> Anyway, this all works, and my stuff appears on stage, but I just >> can't get access to the nested clips! >> >> thanks! >> ben >> _______________________________________________ >> Flashcoders@chattyfig.figleaf.com >> To change your subscription options or search the archive: >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> >> Brought to you by Fig Leaf Software >> Premier Authorized Adobe Consulting and Training >> http://www.figleaf.com http://training.figleaf.com >> >> > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com