Detect end of flash video

Posted on 2006-04-12
Last Modified: 2008-03-10
I want to create a splash window that plays a flash video, then disappears.  I can make the splash window appear and play the video, but if I install a "got to URL" keyframe after the video, that keyframe executes immediately.
Question by:JDL_Tech
    LVL 39

    Accepted Solution

    are you using a FLVPlayback component?
    use event listener to listen for complete status then call your goto URL bit.
    LVL 34

    Assisted Solution

    by:Aneesh Chopra

    put a stop() function on the frame where you want to stop the swf while video is playing and use the  "complete" event of FLVPlayback component to play the next frame on movie completion.

    here I have uploaded a sample FLA for you..

    "FLVPlayback" class support an event "complete" which can be used.
    sample FLA shows how to attach a listner object to listen oncomplete event.
    It shows "movie finished" message on movie complete.

    here is the code for reference
    my_FLVPlybk.contentPath = "myVideo.flv";
    var listenerObject:Object = new Object();
    listenerObject.complete = function(eventObject:Object):Void
    my_FLVPlybk.addEventListener("complete", listenerObject);
    movieComplete = function ()

         movieState.text = "movie finished";

    yes, you can control how much to buffered to play.. if you select the "FLVPlayback" component instance in FLA and see the parameters tab,
    there is a parameter "bufferTime", set the value here for buffering...

    LVL 34

    Expert Comment

    by:Aneesh Chopra
    my comment is just extended version of whatever blue-genie posted...


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
    This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now