I have the following AS:
The idea is to basically allow a name of the evt to be stripped of "target_" and "_mc" so it can be used multiple times in different MovieClip variations.Code:function regionRollOver(evt:MouseEvent):void { var mc:String = evt.target.name; mc = mc.replace("target_", ""); mc = mc.replace("_mc", ""); map_mc.MovieClip("target_" + mc + "_mc").alpha = .5; } //regionRollOver()
The mc MovieClip is nested in map_mc. I get the following error when trying to run the code:
Can anybody help me to be able to control nested MovieClips that are referenced on the fly?Code:TypeError: Error #1006: MovieClip is not a function. at private_fla::MainTimeline/regionRollOver()
Thanks in advance,




Reply With Quote
