Hello guys,
I am confronted with a simply yet annoying problem:
I manually created a row of MovieClips inside another movieclip »container_mc« on the stage in the Flash CS4 Editor. The MovieClips are named in the same convention (eg. target_1_mc, target_2_mc, …target_200_mc).
When I try to access a property of it via AS3 during runtime of the SWF like this, it works:
container_mc.target_0_mc.alpha = 0;
But how do I access the MovieClip dynamically? During runtime, a script will determine of which MovieClip i need to access a property. I will get the ID number of the MovieClip I want to access. So I need to be able to to something like this:
var mc_ID:int = 2;
[“container_mc.target_”+mc_ID+_mc""].alpha = 0;
Obviously, that doesn’t work. When I would create all the target-MovieClips dynamically at runtime, I would simply put them in an array. But in this case I need to work with the existing MovieClips manually created in the Flash Editor.
Any ideas would be highly appreciated!!