|
|||||||
| Multimedia For discussion of all manner of media (audio, video, flash) techniques, as they relate to the web. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Flash flv player AS 2.0: how do I close the player automatically at end of video?
I know that ActionScript 3.0 has fixed this problem, but I'm trying desperately to get the AS 2.0 to do following:
1. Close the .flv file; and 2. Close the video player and return to the root level timeline. I can work my way through adding a listener, but having trouble finding which is the right method if one exists in the either FlVPlayback class or some other one. Can anyone help me?
|
|
#2
|
|||
|
|||
|
I hope this helps someone else. It isn't so much as a close player, but a redirect to another part of the active, or parent, timeline. Hope this helps someone. -- Holly
//Usage 1:: listener object /** Requires: - FLVPlayback component on the Stage with an instance name of my_FLVPlybk - TextArea component on the Stage with an instance name of my_ta */ stop(); import mx.video.*; my_ta.visible = false; my_FLVPlybk.contentPath = "LIFE 01CD_Fortune_100_001.flv"; var listenerObject:Object = new Object(); // create listener object listenerObject.complete = function(eventObject:Object):Void { my_ta.text = "Video completed"; my_ta.visible = true; }; my_FLVPlybk.addEventListener("complete", listenerObject); //Usage 2: listener function /** Requires: - FLVPlayback component on the Stage with an instance name of my_FLVPlybk - TextArea component on the Stage with an instance name of my_ta */ import mx.video.*; my_ta.visible = false; my_FLVPlybk.contentPath = "LIFE 01CD_Fortune_100_001.flv"; function the_end(eventObject:Object):Void { my_ta.text = "Video completed"; my_ta.visible = true; gotoAndStop(2); }; my_FLVPlybk.addEventListener("complete", the_end); |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|