I have this code:
var numOfLinks = 4
for (var i=0; i<numOfLinks; i++) {
var breakImg = new breaker();
breakImg.x = 0
breakImg.y = stage.stageHeight/numOfLinks*i
addChild(breakImg);
breakImg.addEventListener(Event.ENTER_FRAME, mover);
}
function mover(e:Event){
var thim:MovieClip=MovieClip(e.target);
thim.x++
}
I want all of them to move to the right but it keeps returning this error:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::TextField@ebc1629 to flash.display.MovieClip.
at as3_navigation_fla::MainTimeline/texterMover()
I just need all of the movie clips to have the same listener
Can anyone help