Skip to main content
Participant
June 11, 2009
Question

get url on flash video ends

  • June 11, 2009
  • 2 replies
  • 1031 views

Hello i hope someone can helpme i need when a flash video ends redirectme to an html i use Flash CS3 in AS3, i impot the video in a fla document and make a swf to put in html, i can se perfect the video in the web but i dont know how to redirect to and html.

thankyou

This topic has been closed for replies.

2 replies

June 12, 2009

if you are using the standard flv component you could use this

stop();

import fl.video.*;
vid.addEventListener (VideoEvent.COMPLETE, finishedVid);

function finishedVid(event:Event):void{
navigateToURL(new URLRequest("http://www.whatever.com", "_self");

}

Ned Murphy
Legend
June 11, 2009

If the video is spread along the timeline, then create an actions layer with a keyframe at the end where the video ends and put the following code there:

stop();

navigateToURL(new URLRequest("http://www.etc...", "_self");

Participant
June 11, 2009

Thank you Ned i try this and works fine! but there is a problem, my video is in one frame and i try to guess when my video ends put extra frames, and because is progesive download, so i don,t know if the time line makes go to the url before the video download complete. Thank you Ned for read this pods

Ned Murphy
Legend
June 12, 2009

That's why I mentioned whether your video was spread across the timeline.  The solution I offered would be applicable if that's the case, but it isn't based on what you just explained.  You should look thru the last week or two of postings in this forum because I think a coded approach to detect when the video ends was discussed.  I normally avoid anything to do with video... I don't have much experience with it.