Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I make an .flv redirect after it has been viewed?

Status
Not open for further replies.

rvrtrnce

Technical User
Oct 12, 2007
9
US
need a way to redirect a viewer of a flash .flv movie to a page of my choosing after they have watched the entire movie. I can't figure out how to do it in actionscript, manually or with parameter tags in the html.

The user watches the video on the website ( a lectue/presentation) and then has to take a quiz. I need a way to have the video automatically (or with an embedded link) go to another url that has an embedded flash quiz after the user has watched the entire video to prevent them from skipping the video and going right to the quiz.

I created the flash by importing the video using the "streaming from a server" method. My fla library only has the skin and the flv playback icon. On the webpage I embed the swf and i reference the flv to play it back for the viewer.

I have to use a streaming .flv because they are long lectures and they will be viewed on the web. If it was embedded I coul put a link in the timeline at the end but the videos are way to big. I've tried putting the link in the second frame (the first frame contains the entre .flv) but this just makes the video skip the .flv and loop the two frames.

I could either use some simple actionscript for my one and only frame to redirect to another url or possibly a param in the object code after implemetation into the web page that redirects after viewing.

Here's the link to the test video on the webpage:
As you can see I need to put that text link inside the flash! PLEASE HELP!

I can send an example .flv with the same implementation metod if you need me too!

Matt
 
I have a video . . . an flv . . . that's triggered by an swf. Squeeze can export some basic flash functionality.

The swf is putting a white back ground behind the flv (with alpha). I know the alpha is working on the flv because when I play it in Riva flv player, I can see the background behind my video.

Besides, that's not really the most important issue. The getURL failure is more pressing. I've tried both methods described in this thread and neither have worked. I'm copy/pasting the code into the only frame that's there in the swf.
 
Yes, I'm using one. Should I put the commands in the frame or directly in the FLVPlayback component?
 
Great, I've tried that, but nothings happening at the end of the video.

I'm importing the video, choosing no playback controls (it will just play and jump to html data) and choosing progressive download. Is there some other way I should be doing things that would make this easier?
 
You're going to love this.

I tried that too, and the geturl executed right away (even though it was the last keyframe in the timeline), and gave me an error message. Don't remember what it was, but how could it have executed right away. Why would it even know what was in that last frame?
 
Here's my code:

import mx.video.*;

var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
getURL("};
FLVPlayback.addEventListener("complete", listenerObject);

and here's my current error message:

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 7: The property being referenced does not have the static attribute.
FLVPlayback.addEventListener("complete", listenerObject);

Total ActionScript Errors: 1 Reported Errors: 1
 
Yikes, is there some kind of step by step tutorial I can try to see where I'm going wrong? I just beat my head against a wall for two hours. Every method, every variable adjusted on two computers. Nothing, no geturl at all.

How can this be so hard?
 
I always say this, but the error message from Flash does tell you what is wrong. In this case "FLVPlayback" is a Class name and you're using it as an instance name. Change it to something else.

Kenneth Kawamoto
 
Alright, but don't know what that means. Can I just change that variable to anything? Does anything else have to share that name?

Even when it's my_FLVPlybk nothing happens. I get no error message, however, it just fails and doesn't tell me why.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top