Qky
05-16-2008, 09:36 PM
Hey all!
Please help! :)
Well, I have a few clips in library and few bottons on the stage.
Botton instance names: btn1, btn2...
Clip instance names: btn1Anim, btn2Anim...
And folowing code:
btn1.addEventListener(MouseEvent.CLICK, MovieClipIn)
btn2.addEventListener(MouseEvent.CLICK, MovieClipIn)
...
function MovieClipIn(e:Event):void{
var AnimName:String = e.target.event + "Anim";
var movie:AnimName = new AnimName();
movie.x = 0;
movie.y = 150;
addChild(movie);
}
It does't work!
....
Thank you...
Please help! :)
Well, I have a few clips in library and few bottons on the stage.
Botton instance names: btn1, btn2...
Clip instance names: btn1Anim, btn2Anim...
And folowing code:
btn1.addEventListener(MouseEvent.CLICK, MovieClipIn)
btn2.addEventListener(MouseEvent.CLICK, MovieClipIn)
...
function MovieClipIn(e:Event):void{
var AnimName:String = e.target.event + "Anim";
var movie:AnimName = new AnimName();
movie.x = 0;
movie.y = 150;
addChild(movie);
}
It does't work!
....
Thank you...