FORUMS: list search recent posts

Poster Frame - Hide on mouse out

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Steve Ganem
Poster Frame - Hide on mouse out
on Dec 21, 2011 at 10:13:31 pm

Hi, I'm trying to hide a video poster frame on mouse out. Below is the base action script I'm using. When I add another function & listener to bring the poster frame back on mouse out nothing happens.

Thanks in advance for any help.

import fl.video.VideoEvent;

function playMovie(evt:MouseEvent):void {
myVideo.play();
}

posterFrame.addEventListener(MouseEvent.MOUSE_OVER, playMovie);

function hidePosterFrame(evt:Event):void {
posterFrame.visible = false;
}

myVideo.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, hidePosterFrame);

function showPosterFrame(evt:Event):void {
posterFrame.visible = true;
}

myVideo.addEventListener(VideoEvent.COMPLETE, showPosterFrame);


Return to posts index

demetri tashie
Re: Poster Frame - Hide on mouse out
on Dec 22, 2011 at 12:36:22 am

Steve,
adjust the code to this and see how it works for you
import fl.video.VideoEvent;

function playMovie(evt:MouseEvent):void {
myVideo.play();
}
posterFrame.addEventListener(MouseEvent.MOUSE_OVER, playMovie);

function hidePosterFrame(evt:VideoEvent):void {
posterFrame.visible = false;
}
myVideo.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, hidePosterFrame);

function showPosterFrame(evt:VideoEvent):void {
posterFrame.visible = true;
}
myVideo.addEventListener(VideoEvent.COMPLETE, showPosterFrame);


in these cases the functions 'hidePosterFrame' and 'showPosterFrame' are best typed as 'VideoEvent', not just 'Event'

besides that, i can't imagine that you want to make visible the posterFrame movieclip on mouse out as well as mouse over as you asked.

if you meant to say to have it hide on mouse over and visible on mouse out, then the mouse over and mouse out would keep conflicting with each other, causing (presumably) unwanted results.

i hope that helps, but if the above code doesn't do what you are presumably asking about, then please let us know and we can further explore a solution.


Return to posts index

Steve Ganem
Re: Poster Frame - Hide on mouse out
on Dec 22, 2011 at 3:50:20 pm

Thank you!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]