A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: can't add eventListener to FLV...?

  1. #1
    Member
    Join Date
    Sep 2005
    Posts
    32

    can't add eventListener to FLV...?

    Hey guys,
    I want to add a simple "play again" button when my FLV stops playing. Pretty simple, right? For whatever reason I can't add an eventListener when my video stops though. I can't even trace anything. the video loads i can dynamically change the volume so it's not like i'm referencing it wrong or something like that. Any ideas?

    Code:
    //stop swf playback
    stop();
    import mx.video.*;
    //load .flv
    _root.myFlv.contentPath = "../iron.flv";
    
    //new listener to show "play again" btn
    var listenerObject:Object = new Object();
    _root.myFlv.addEventListener("complete", listenerObject);
    listenerObject.complete = function(eventObject:Object):Void {
    replayBtn._alpha = 100;
    };

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Location
    Nottingham, UK
    Posts
    348
    that ; at the end of your code wouldn't have anything to do with it, would it?

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