всем привет, подскажите почему не срабатывает событие ролл овер
Код AS3:
package com
{
import flash.display.MovieClip;
import flash.display.Stage;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.ui.Mouse;
public class Main extends MovieClip
{
private static const CURSOR_X:int = 250;
private static const CURSOR_Y:int = 150;
private var cursor:MovieClip;
private var _stage:Stage;
public function Main()
{
this.addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event):void
{
trace("Main class loaded")
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_stage = stage;
//Mouse.hide();
cursor = new Cursor();
stage.addChild(cursor);
cursor.x = CURSOR_X;
cursor.y = CURSOR_Y;
cursor.rotation = -7;
_stage.addEventListener(MouseEvent.ROLL_OVER, mouseOver, false, 0, true);
_stage.addEventListener(MouseEvent.MOUSE_MOVE, moveCursor, false, 0, true);
}
private function mouseOver(e:MouseEvent):void
{
trace("mouse over")
cursor.gotoAndStop("handl");
}
private function moveCursor(e:MouseEvent):void
{
cursor.x = stage.mouseX;
cursor.y = stage.mouseY;
}
}
}