views:

456

answers:

1

My movieclip clipArt_mc receives movieclips that are loaded dynamically from a listbox selection using:

var myLoader9:Loader = new Loader();  

I apply color to clipArt_mc using the following:

 var trans3:Transform = new Transform(MovieClip(parent).design_mc.clipArt_mc);

I would like to access the nested or loaded in movieclip inside of clipArt_mc that has in it a movieclip named color_mc so that I can apply color directly to it instead of clipArt_mc.

Can this be done?

Thank you in advance for your time. Anne

A: 

There are a few ways you can try to get the child MovieClip. In your case, it sounds appropriate to try to get the child by name. If the situation is as you say, you should be able to do this:

var child:DisplayObject = clipArt_mc.getChildByName(color_mc);

You can then apply the relevant transform to child.

danyal
Thanks for taking the time to answer.I'm not using DisplayObject. I'm loading the clip art dynamically from a listbox selection to a movieclip (design_mc.clipart_mc) that is already placed onstage. The listbox is loaded separately therefore the target to load to is: MovieClip(parent.parent).design_mc.clipArt_mc;The clips being loaded are .swf files like flower.swf. Within flower.swf there is the mc color_mc that I’m trying to access.Can this be done or have I set this up incorrectly? Want to load in the flower.swf and other clipart to keep main file size low.Thanks for your help
Anne
Thank you, took a while to understand this.
Anne