dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Simple action at end of .flv?

Hybrid View

  1. #1

    Question Simple action at end of .flv?

    I'm going to place an .flv on frame 5 of my timeline. I'm planning to put a stop action on that frame as well. Once the video is done playing, I'd like it to automatically go to and play frame 6 on my timeline. Isn't there a simple way to do this? I apologize if this is a simple thing. I'm certainly not a flash video expert.

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Location
    Nottingham, UK
    Posts
    348
    what version of actionscript are you using? regardless, you want to search the flash help section for VideoEvent.COMPLETE, i think. You can find it by referring to the FLVplayback component's method summary.

    Dan

  3. #3
    I'm using Actionscript 2. I have read that an Event Listener is one way to go, but I don't know how to do it. I placed a cue point at the end of the imported video, so if there's a way to utilize that to make it goto and play, sweet. The entire piece is on one stage. Only frames 5 and 6. (It will eventually have a preloader on frame 1)

  4. #4
    I got it to work. Here's what I used:

    //*
    //Requires:
    //- FLVPlayback component on the Stage with an instance name of my_FLVPlybk
    //
    import mx.video.*;
    var listenerObject:Object = new Object();
    listenerObject.complete = function(eventObject:Object):Void {
    gotoAndPlay(6);
    //or
    //_root.gotoAndPlay(6);
    };
    my_FLVPlybk.addEventListener("complete", listenerObject);
    my_FLVPlybk.contentPath = "mymovie.flv";

    Thanks for your help!

  5. #5
    Senior Member
    Join Date
    Apr 2008
    Location
    Nottingham, UK
    Posts
    348
    good for you! You'll find that the flash help docs are indispensible...

    Dan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center