A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Video end frame/play detection

  1. #1
    Senior Member
    Join Date
    Nov 2000
    Posts
    166

    Video end frame/play detection

    I have never really done any actionscripting that involved video, so I need a little help.

    I have a video that uses the FLVPlayback component and just http streaming. It has an instance name of "prop". I have a movieclip with an instance name of "overlay" that is on a layer above the video. I want "overlay" to go to frame "map" only when the video is at the end frame (the video is set to stop there and not auto rewind). Any other time I want "overlay" to go to the frame "playback".

    So that is the situation. Any help on how I could achieve this would be greatly appreciated.

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    166
    ok, I got half the equation. I got it to go to the correct frame when the video gets to the end point with this code
    Code:
    var listener:Object = new Object();
    listener.complete = function(evt:Object):Void {
      overlay.gotoAndStop("map");
    }
    prop.addEventListener("complete", listener);
    Now, for the other half...How do I make it return to the initial frame when the video leaves that last frame? This could be either by pressing the play button again, or rewinding, or scrubbing to some other part of the video.

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