How to Redirect from Flash Video to another Website?

  • skyfrance
  • Newbie
  • Newbie
  • No Avatar
  • Joined: May 16, 2005
  • Posts: 5
  • Status: Offline

Post June 23rd, 2009, 3:35 pm

Hi All, I need some help in creating a way to create a redirect at the end of a flash movie so that it will be redirected to another website.

Can this be done in Dreamweaver?

I have both, AF2 and AF3. I have tried to do this in AF2 from a video that I saw, and when I open my flash video in AF2 there is only one layer and nothing on the timeline. I don't know if this is because it is compressed or not. But in the video, they show to move the time line to the very end and then add info for a redirect. But, since I only have one layer and the timeline doesn't show anything, I can't do these steps.

Maybe there is some html or java code that I can add to get this to work.

I just don't know where to turn.

Any information, (and I am a bit of a dummy with code etc. so need detail explanations) would be greatly appreciated.

I am working on a Mac. running 10.5 and as stated, I have AF2 and AF3 but would love to be able to do this in Dreamweaver.

Thanks Again,

Mike
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 23rd, 2009, 3:35 pm

Post June 23rd, 2009, 3:40 pm

Hello,

A player controlled by javascript and voila...
  • skyfrance
  • Newbie
  • Newbie
  • No Avatar
  • Joined: May 16, 2005
  • Posts: 5
  • Status: Offline

Post June 23rd, 2009, 3:44 pm

Can you give me an example of a player controlled by javascript? Will it work with Dreamweaver or is it a player that you buy and then use to add the redirect?

Sorry, not knowledgeable with this. If you could share a little more info it would really be appreciated.

Thanks

Mike

Post June 23rd, 2009, 3:55 pm

and see on our site (gallery)

we use flowplayer, longtailvideo players who are driven by open source javascript

we have solutions for streaming video


Best regards
  • joebert
  • Weathered
  • Genius
  • User avatar
  • Joined: Feb 10, 2004
  • Posts: 11817
  • Loc: Clearwater, FL
  • Status: Offline

Post June 23rd, 2009, 3:57 pm

Are you working with an FLV file, or an SWF file ?
Why yes, yes I am.

Post June 23rd, 2009, 3:59 pm

the swf is a player but the video can be streamée flv, mpeg4 h264, wmv
  • skyfrance
  • Newbie
  • Newbie
  • No Avatar
  • Joined: May 16, 2005
  • Posts: 5
  • Status: Offline

Post June 23rd, 2009, 4:08 pm

I am working with flv.
  • skyfrance
  • Newbie
  • Newbie
  • No Avatar
  • Joined: May 16, 2005
  • Posts: 5
  • Status: Offline

Post June 23rd, 2009, 4:32 pm

Pascal,

Thanks for the info, but when I go to your website, well, it is all in French. I apologize because I don't speak or read French.

Mike
  • joebert
  • Weathered
  • Genius
  • User avatar
  • Joined: Feb 10, 2004
  • Posts: 11817
  • Loc: Clearwater, FL
  • Status: Offline

Post June 23rd, 2009, 9:35 pm

Hopefully someone can prove me wrong, but I don't believe you can embed navigation to other sites in an FLV. You should be able to use cue points to trigger the player to go to a URL, but the FLV itself only has navigation cue points to go to certain keyframes within the video.
Why yes, yes I am.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22454
  • Loc: Pittsburgh PA
  • Status: Offline

Post June 24th, 2009, 5:21 am

Well first of all you lost me on AF2 and AF3. What is that?

I don't think it's at all possible in Dreamweaver. Even with this Flash Video Player Extension for Dreamweaver, none of the 35 configurable parameters give you that option.

You'd need a Flash authoring tool like, Flash. Normally using Flash, you would add a cuepoint at the end of the FLV when you encode it. If you can't do that, you can create a cuepoint with actionscript. Then using action script you'd set up an event listener for the cuepoint which you could use to load the URL of your external page.

//and Joebert, you are correct on the cuepoints. You can embed both navigation and event cuepoints when encoding the FLV but they are only for the FLV itself.
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • rgoedhart
  • Born
  • Born
  • No Avatar
  • Joined: Jul 29, 2009
  • Posts: 1
  • Status: Offline

Post July 29th, 2009, 6:40 am

Hi All,

i've got the same problem, only i'm a motion-graphic designer and absoultely not a flashprogrammer.

i made a cuepoint but have no idea what for code i must insert.
after the movie is finished to redirect to for example index2.html
but this can not be work with an timer, cause if someone set the pauze it will not work right?

see, this site is only a small part of the video.
http://www.iconicbranding.nl/ichap2/
The official video is 10minutes long.

I have no idea, i've watched all over the internet to find a solution but hopelfully you can help me out..
and show me as file, cause i've got no idea what i'm doiing

Thanks,

Roderick
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22454
  • Loc: Pittsburgh PA
  • Status: Offline

Post July 29th, 2009, 8:03 am

I'll try to throw up an example sometime today.
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22454
  • Loc: Pittsburgh PA
  • Status: Offline

Post July 29th, 2009, 11:04 am

OK, here's how to do this, in both AS3 and AS2

First some basics.
I used Flash CS3 Video Encoder to encode the FLV so I could embed my own cuepoints. What you name them doesn't matter. Just make certain you adjust the action script below to the cuepoint name you choose. In most cases I'll put one at the beginning (as a navigation) and one at the end (as an event). In this case I called the one at the beginning "begin" and the one at the end "finished". Here's a screen shot:
Attachments:
cuepoints.jpg


It's so much easier to create your own cuepoints as you encode your video. Unfortunately, sometimes you are just handed an FLV without cuepoints. Fortunately you can create your own using ActionScript. I've never had to do it that way, but there's plenty of tutorials out there that explain how if you need to.

One last note - remember that your FLV HAS to be imported to the first frame of your timeline. If you can't do that in your movie you'll have to create it in it's own movie and then load that movie into your main one.

Now that I have my FLV encoded with cuepoints added, simply open a new blank Flash file (AS3 or AS2, whichever you prefer) and import your FLV to stage using the FLVPlayback component (requires Flash 8 or higher).

Give your FLVPlayback component whatever instance name you want. In this case I used "my_FLVPlybk" (which you'll see is pretty common if you ever look through tutes.)

If you are working with ActionScript 3, on the same frame as your FLV add this code:
Code: [ Download ] [ Select ]
import fl.video.*;
 
//set up the cuepoint listener
my_FLVPlybk.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
function cp_listener(eventObject:MetadataEvent):void {
    //trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
    //trace("Cue point name is: " + eventObject.info.name);
    //trace("Cue point type is: " + eventObject.info.type);
   
    //listen for the end cuepoint which I named "finished" during encoding
    if (eventObject.info.name == "finished") {
        var URLReq:URLRequest = new URLRequest("http://www.xmission.com/~emailbox/whycat.htm");
        try {
    //here's our redirect
            navigateToURL(URLReq, "_self");
        } catch (e:Error) {
            trace(e);
        }
    }
}
  1. import fl.video.*;
  2.  
  3. //set up the cuepoint listener
  4. my_FLVPlybk.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
  5. function cp_listener(eventObject:MetadataEvent):void {
  6.     //trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
  7.     //trace("Cue point name is: " + eventObject.info.name);
  8.     //trace("Cue point type is: " + eventObject.info.type);
  9.    
  10.     //listen for the end cuepoint which I named "finished" during encoding
  11.     if (eventObject.info.name == "finished") {
  12.         var URLReq:URLRequest = new URLRequest("http://www.xmission.com/~emailbox/whycat.htm");
  13.         try {
  14.     //here's our redirect
  15.             navigateToURL(URLReq, "_self");
  16.         } catch (e:Error) {
  17.             trace(e);
  18.         }
  19.     }
  20. }



If you are working with AS 2 here is your code:
Code: [ Download ] [ Select ]
//to use getURL it has to be in an on or onClipEvent so we use onClipEvent (load)
onClipEvent (load) {
import mx.video.*;
 
//set up the cuepoint listener
var listenerObject1:Object = new Object();
listenerObject1.cuePoint = function(eventObject:Object):Void {
     var cuePtName = eventObject.info.name; //variable for cuepoint name
     //listen for the end cuepoint which I named "finished" during encoding
     if (cuePtName == "finished") {
     //do the redirect
     getURL("http://www.xmission.com/~emailbox/whycat.htm", "_self");
     
     //trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
     //trace("Cue point name is: " + eventObject.info.name);
     //trace("Cue point type is: " + eventObject.info.type);
      }
  };
my_FLVPlybk.addEventListener("cuePoint", listenerObject1);
}
  1. //to use getURL it has to be in an on or onClipEvent so we use onClipEvent (load)
  2. onClipEvent (load) {
  3. import mx.video.*;
  4.  
  5. //set up the cuepoint listener
  6. var listenerObject1:Object = new Object();
  7. listenerObject1.cuePoint = function(eventObject:Object):Void {
  8.      var cuePtName = eventObject.info.name; //variable for cuepoint name
  9.      //listen for the end cuepoint which I named "finished" during encoding
  10.      if (cuePtName == "finished") {
  11.      //do the redirect
  12.      getURL("http://www.xmission.com/~emailbox/whycat.htm", "_self");
  13.      
  14.      //trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
  15.      //trace("Cue point name is: " + eventObject.info.name);
  16.      //trace("Cue point type is: " + eventObject.info.type);
  17.       }
  18.   };
  19. my_FLVPlybk.addEventListener("cuePoint", listenerObject1);
  20. }


I added a few comments to help explain what's going on.

The end result is the same in both cases:
AS 3 example
AS 2 example

(my apologies for the length of the video. It was the shortest one I had available. If you don't want to watch the whole thing just use the slider to scrub near the end - I set it to redirect to a related page on why cats do things).
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1597
  • Loc: Minneapolis, MN
  • Status: Offline

Post July 29th, 2009, 11:08 am

Hey Mark that seems pretty complicated. Do you have a big benefit to using cuepoints over a video complete callback?

I would simply do flvplayback.onComplete = new url...
//// Designer, Art Director, Developer & Teacher of Interactive, Motion and 3D \\\\
WhenImNotSleeping.com
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Joined: May 28, 2003
  • Posts: 22454
  • Loc: Pittsburgh PA
  • Status: Offline

Post July 29th, 2009, 11:27 am

Yep, I suppose you could do that as well. I'm just so used to working with cuepoints now, that it's almost second nature. I do a lot of multimedia in house at work, and need the navigation. I've actually never had a need to redirect to a new page at the end, but it was pretty simple. One cool thing I discovered today while I was doing a little looking around is that you can add a URL as a parameter during encoding so you can actually make your FLV into a hyperlink. I'd seen that done, but it never occurred to me to look into how.

So to answer Joeberts question above, yes you can
joebert wrote:
Hopefully someone can prove me wrong, but I don't believe you can embed navigation to other sites in an FLV.
"The web is a dominatrix. Every where I turn, I see little buttons ordering me to Submit."
Play sports pools and discuss sports topics at Boasting Rights Sports Forum
Get paid to write articles - www.associatedcontent.com
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 29th, 2009, 11:27 am

Post Information

  • Total Posts in this topic: 16 posts
  • Users browsing this forum: No registered users and 53 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.