I'm running AS3 in Flash CS5 and I'm trying to make a box fade in when the mouse moves to the right.
Here's my code thus far:
stage.addEventListener(MouseEvent.MOUSE_MOVE, changeAlpha);
function changeAlpha(event:MouseEvent) {
fader.DisplayObject.alpha =(root.mouseX/550);
}
It is not responding to moving the mouse. I feel like the source of the codeis outdated. Does anybody know what's wrong?
Other info: there is only 1 frame with 2 layers; one layer is this code and the other is a box that covers the stage with instance name "fader"
I'm also getting this error: TypeError: Error #1010: A term is undefined and has no properties.
North America
Europe, Middle East and Africa
Asia Pacific