Please … i dont get what im doing wrong. AS3 Doc with 2 mc’s with instances on stage"box1" , “box2” getting this error cant past trough it… cant figure out what im doing wrong.
Any help would be appreciated
1120: Access of undefined property button. button.addEventListener(MouseEvent.ROLL_OVER, overHandler);
import com.greensock.*;
import com.greensock.easing.*;
import flash.events.MouseEvent;
var timeline:TimelineLite = new TimelineLite();
timeline.append(new TweenLite(box1, 1, {y:"-100"}));
timeline.append(new TweenLite(box2, 1, {y:"-100"}));
button.addEventListener(MouseEvent.ROLL_OVER, overHandler);
button.addEventListener(MouseEvent.ROLL_OUT, outHandler);
function overHandler(event:MouseEvent):void {
timeline.reverse();
}
function outHandler(event:MouseEvent):void {
timeline.play();
}