FORUMS: list search recent posts

Changing URL on the end of a Flash video

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Peter Berthet
Changing URL on the end of a Flash video
on Dec 10, 2008 at 5:59:45 am

Hey guys,

Im somewhat new to actionscript, and while i understand how it works im at a loss as to how the hell i get this happening.

Basically what i have is a FLV that is an intro to a website, so it loads, plays once, then what i want it to do once it ends is to automatically kick the browser over into the new website

at the moment what i have is an actionscript driven flv inside a flash project, with the following code

var nc:NetConnection = new NetConnection();

var ns:NetStream = new NetStream(nc);
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);"h264_comp_2.flv");


function asyncErrorHandler(event:AsyncErrorEvent):void {

and that works to make it PLAY once, if anyone has any suggestions as to how i can make it forward the browser id be very thankful

Return to posts index

Sam Mattern
Re: Changing URL on the end of a Flash video
on Dec 15, 2008 at 3:27:39 pm

Just detect the end, and upon detecting it, call a getURL. The NetStream sends a status of "NetStream.Play.Stop" when the playback has finished. Check it like this:

ns.onStatus = function( oData:Object):Void{
if( oData.code == NetStream.Play.Stop ){

I also verify it's at the end checking the time against the duration (rounding needed), but that's up to you. You can see more about doing that here:


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved