A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: After FLV Plays, Go back to beginning of movie?

  1. #1
    Junior Member
    Join Date
    Feb 2005

    After FLV Plays, Go back to beginning of movie?

    I have a simple file that I'm trying to add fuctionality to -- it is basically a button that uses this code to play a video:

    button.onRelease = function() {
        this._visible = false;
        trace("clicked "+this._name);
    So, that works great. You click a button, the video plays. My question is, once the FLV is done, how do I get the flash file to go back to the beginning and once again show the Button, and rewind the video? As it stands right now, it just sits on the last frame of the .flv.


  2. #2
    Junior Member
    Join Date
    Feb 2005
    I've been trying to figure this out, and so far I've got this far:

    var listenerObject:Object = new Object();
    listenerObject.complete = function(eventObject:Object):Void {
    // what do I put here
    myVideo.addEventListener("complete", listenerObject);
    So what I need to know is this: What do I put in the "what do I put here" section that will basically restart the .swf from the very start ... where the button showed up (see my previous post).


  3. #3
    Senior Member layerburn's Avatar
    Join Date
    Jul 2006
    If you want the video to loop you would put


    If you wanted it to go back to the first frame of the flv

    This is your brain. This is your brain on script.

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