FORUMS: list search recent posts

Auto Close FLV at End of Play

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rebecca Gallagher
Auto Close FLV at End of Play
on May 29, 2009 at 6:53:51 pm

Hi,
I can create a basic website without any bells and whistles in Flash and am trying to do something a little more advanced so I need to reach out for some advice.

I want to have an FLV open on click, layered on top of the background, and autoplay, then automatically close at the end of play. Is that possible?

I know how to set the parameters for autoplay, but am uncertain how to get it to auto close at the end.

Thanks!


Return to posts index

demetri tashie
Re: Auto Close FLV at End of Play
on May 29, 2009 at 8:14:00 pm

you are lucky, i just finished writing this code for someone else !

there are of course different ways to accomplish this. this way seems quick, easy and efficient. you import the VideoEvent Class, and then add a listener to the video playback component that once COMPLETE, it gets removed from the display list. my instance name of the player is "flvPlayer"

here is the code:

import fl.video.VideoEvent;

stop();

flvPlayer.source="yourVideo.flv";
flvPlayer.autoPlay=true;

flvPlayer.addEventListener(VideoEvent.COMPLETE, noMoreVideo);

function noMoreVideo(evt:VideoEvent):void{
removeChild(flvPlayer);
}


hope that is easy enough. let us know if you need more help


Return to posts index

Tyson Frantz
Re: Auto Close FLV at End of Play
on Sep 10, 2009 at 4:05:12 am

I'm currently still learning AS3... could anyone please provide the same solution in AS2?

Thank you for your help!


Return to posts index

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