Copy link to clipboard
Copied
Hi, I would like to try to select a custom area or shape that will automatically appear and play a video based on that area whenever I mouse hover over it, and disappear and stop the video when I mouse over it.
How do I do this, please?
just leave it. change the code to:
video_mc.visible= false;
video_mc.video1.stop();
btn.addEventListener(MouseEvent.MOUSE_OVER,overF);
video_mc.addEventListener(MouseEvent.MOUSE_OUT,outF);
function overF(e:MouseEvent):void{
video_mc.visible=true;
video_mc.video1.play()
}
function outF(e:MouseEvent):void{
video_mc.visible=false;
video_mc.video1.stop();
video_mc.video1.seek(0);
}
Copy link to clipboard
Copied
you're welcome.