views:

33

answers:

2

Hi there,

I'm trying to create a video player in AS3 that displays the player controls when the user hovers over the video, however I'm having a hard time getting the MOUSE_OVER event to fire. I've made sure that the video's index is at the top, so that's not the issue. Is there something I'm missing? Is there any reason why this event listener wouldn't work on a video object?

video.addEventListener(MouseEvent.MOUSE_OVER, doThis);

Any ideas on how to make this work?

Thanks in advance for taking a look!

A: 

Check that your browser has the SWF object in focus. sometimes this may require you to click on the flash frame first to start detecting user events.

this can also be done in javascript with

var flex = document.${swf_application} || window.${swf_application};
flex.focus( );
sean
+1  A: 

you could try adding the mouse_over to a Display Object holding the video, and use it to call the function in the video.

also you could consider using roll_over

Daniel
We have a winner! Wrapping the video object in a display object did the trick. Thanks!
Travmatron86