Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Stage Events

4 replies [Last post]

Is there any way to listen for stage events like MOUSE_LEAVE, MOUSE_MOVE, ect?

I have tried
public function initializePlugin(view:AbstractView):void
{
stage.addEventListener(Event.MOUSE_LEAVE, onMouseLeave_stage);
//or
view.skin.stage.addEventListener(Event.MOUSE_LEAVE, onMouseLeave_stage);
}

but events seems not to fire (stage is not null) ;/
Any ideas?

@panel:

Your plugin will be placed on top of everything else, so you should be able to simply add a transparent sprite / movieclip and listen for events there.

I am having a similar problem.

I cannot track mouse up events when the cursor is outside the stage.

Anyone have any ideas?????

@Mr Smith:

Flash can't track mouse events once you've left the stage.

hello

with mootools

window.addEvent('domready', function(){
$('player2').addEvent('click', function(){
alert('clicked!');
});
$('player2').addEvent('mouseover', function(){
alert('clicked!');
});
$('player2').addEvent('mouseleave', function(){
alert('clicked!');
});
});