A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: How to make FLV stop and disappear when done?

  1. #1
    DC Man
    Join Date
    May 2007
    Posts
    16

    How to make FLV stop and disappear when done?

    I simply want to make the .FLV file stop and disappear when it's done. Please help - thanks.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    use the FLVPlayback.complete event -
    PHP Code:
    // my_FLVPlybk - instance name of the FLVPlayback component
    sObject.complete = function(Obj:Object):Void {
    trace("The video has ended");
    my_FLVPlybk._visible false;
    };
    my_FLVPlybk.addEventListener("complete"sObject); 

  3. #3
    DC Man
    Join Date
    May 2007
    Posts
    16
    Thank you for your reply. I still cannot get it to work though. I named the instance and put the script on another layer (total size is 1 frame).

    I have uploaded the .FLA and .FLV file here if you wish to see

    http://hyperblitz.com/flaandflv.zip

    Please let me know what I am doing wrong here. Thank you again - it's much appreciated!

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    my bad -- forgot to add code to create the object -
    PHP Code:
    var sObject:Object = new Object(); // create a new empty object

    sObject.complete = function(Obj:Object):Void  {
        
    trace("The video has ended");
        
    my_FLVPlybk._visible false;
    };
    my_FLVPlybk.addEventListener("complete"sObject);

    my_FLVPlybk.contentPath "access_hollywood11-2-06Med_Prog_002.flv"

  5. #5
    DC Man
    Join Date
    May 2007
    Posts
    16
    thanks - I tried it but it still doesn't disappear. I'm not sure if I'm doing this right. I uploaded the new .fla here

    www.hyperblitz.com/fla2.zip

  6. #6
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    1- you applied the actions on the movieclip as well as the root timeline
    2- you did not create the object - var sObject:Object = new Object();
    Last edited by a_modified_dog; 11-30-2007 at 10:43 AM.

  7. #7
    DC Man
    Join Date
    May 2007
    Posts
    16
    Thank you so much! That was a tremendous help to me.

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