Skip navigation
robertnzana
Currently Being Moderated

How to play FLV Ad before FLV video?

Sep 9, 2007 5:32 PM

I have a Flash video player (FLV). I want to auto play a FLV ad before I play the video. It would be great to have the Ad random if possible, but that's not necessary. Any suggestions?

Would the best way be to pass the ad FLV & mail FLV path in the EMBED tag, then use AS to play it? If so, any sample code? I'm VERY NEW to AS and am lost.

Thanks in advance. You all are great!!!!
 
Replies
  • Currently Being Moderated
    Sep 9, 2007 6:19 PM   in reply to robertnzana
    I think I just found something that may help you. I'm actually looking to do nearly the same thing. I have a externally loaded FLV in a scene. When that FLV ends, I'd like to to load another scene -- Can this code I'm giving you be changed to do that?
    Here's teh description, then the code from Adobe:

    Playing multiple FLV files

    You can play FLV files sequentially in an FLVPlayback instance simply by loading a new URL in the contentPath property when the previous FLV file finishes playing. For example, the following ActionScript code listens for the complete event, which occurs when an FLV file finishes playing. When this event occurs, the code sets the name and location of a new FLV file in the contentPath property and calls the play() method to play the new video.

    import mx.video.*;
    my_FLVPlybk.contentPath = " http://www.helpexamples.com/flash/video/clouds.flv";
    var listenerObject:Object = new Object();
    // listen for complete event; play new FLV
    listenerObject.complete = function(eventObject:Object):Void {
    if (my_FLVPlybk.contentPath == " http://www.helpexamples.com/flash/video/clouds.flv") {
    my_FLVPlybk.play(" http://www.helpexamples.com/flash/video/water.flv");
    }
    };
    my_FLVPlybk.addEventListener("complete", listenerObject);
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 3, 2008 3:07 PM   in reply to steeve
    For me the next clip does not load/play.
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)