Link to home
Start Free TrialLog in
Avatar of icarus004
icarus004Flag for United States of America

asked on

Need to add link at end of an .flv movie.

Hello,

I have made a few .flv movies by converting a finished .swf. I'm using a basic flv player that Adobe Flash CS4 included. I'm very new to flash and have had no formal training, which is likely apparent... Basically, I made the flv file, made another swf project that includes the flv player with sources pointing to the website that has the flv file.

The video plays fine now, with controls and such, but now what I need to do is have the video play all the way through and then present a simple link at the end that brings the viewer to another page, sort of like a youtube video provides related videos at the end.

I can't really figure out what I need to do, were this link gets embedded, and how I make it appear only at the end. If anyone has any suggestions, I'd be grateful!
Avatar of viral_sonawala
viral_sonawala

Just do like this

myBtn(Instance Name).onRelease = function()
 {
  // Do something. (gotoUrl (_www.google.com)

};
What you need to do is listen out for the "COMPLETE" event from the FLVPlayback component, which signifies the end of the video. Once you see that event, make your button visible.

I assume you are using the FLVPlayback component. Give it an instance name of "myVideo" and try the following snippet:
myVideo.addEventListener(VideoEvent.COMPLETE, onVideoComplete);
function onVideoComplete(evt:VideoEvent){
	// make your button visible here
	// or go to a frame where it is visible
}

Open in new window

Or to simplify it you could just at the stop function on the last frame.
Make a button and put it action as onClick gotoUrl
the video runs asynchronously though so the last frame of the SWF doesn't necessarily mean the last frame of your FLV (unless it's directly embedded in the timeline, which you wouldn't do for a video of any real size)
Avatar of icarus004

ASKER

Hi, sorry for the lack of response. I'm learning this as I go along.

I'm not really so sure the proper way to make a button. I added one from the components window, but going into the actions menu, won't allow me to edit it. Can someone tell me in a little bit more detail how I'd make a button, have it only appear after the video (the video, again is embedded in a swf file. There is only one frame on the timeline) and have it say something like "click here to continue"

Sorry, as I said, I'm really just trying to do one thing with Flash, so I don't really know anything. Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of ccarey
ccarey
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial