if you are using FLVPlayback component, you can use the "complete" event. var listenerObject:Object = new Object(); listenerObject.complete = function(eventObject:Object):Void { // insert event-handling code here }; my_FLVplybk.addEventListener("complete", listenerObject);
It works briliantly. Thank you very much for solving my problems.
I am trying to do something similar, I want it to go to and play a frame, then load a movie clip when its done without having to click on anything. ActionScript is not my strong point, so I need a bit of help on this.
Is the FLV component only available in Flash 8. We haven't upgraded yet, we're still on MX 2004. Is there anyway to do it in this version?
I am not sure about MX but I am sure that onComplete event handle is only avaible on Flash 8. I have no idea how to solve this issure in MX sorry bcos I am very new in Flash too... You must get Flash 8 in my opinion. If you have to solve this issue in very urgent, I suggest that to embed the clip/ movie in Flash then make it into swf file so that you can control it with a script.
Yes, we definitely need to upgrade but I don't think I can get a PO through by tomorrow. I am trying to load swf files after playing an animation. Right now it looks like this on(release) { goToAndPlay("transition"); } This works great, but when I add the loadMovie after goToAndPlay, it loads before its finished playing. Which makes sense. My actionscript skills are awful so I don't even know where to start to get the swf without an event.
if you just Iwant it to go to and play a frame without having to click on anything, you just need to embed the entire movie file on the root time line then adding scripts on the last frame of that time line. You dont need an event handler. This is not an ideal way but to solve your deadline by tomrorow.
That sounds great and all, but please excuse my ignorance in all of this. Can you give me an example?
follow the link here to get the fla example which I have just embeded a movie file straight on the root timeline and then I add another layer for scripting. look at the last frame of the timeline where I have add a very simple gotoAndPlay script. hope ths is what u looking for. otherwise you really need to get flash 8. or hopefully someone coming along on this forum and solve the MX problem for you. good luck. http://www.lauthiamkok.net/scripting_languages/ActionScript/Flash_8/video%20obje ct/ get this file - embeded video.fla
Thanks TKLau. I downloaded the file and took a look. This is what I'm trying to do, only in reverse. I want to play some frames, then when they are finished, load a swf. Right now my file is set up to play 35 frames, then stops. When the user clicks, it plays the rest of the frames. When its done with this, I want it to load a new swf. Thanks again.
TKLau > welc:smile;me _pixel_chick >
[q][i]Originally posted by: [b][b]_pixel_chick[/b][/b][/i] Right now my file is set up to play 35 frames, then stops. When the user clicks, it plays the rest of the frames. When its done with this, I want it to load a new swf.[/q] just dont add the loadMovie script to your button, add it to the last frame of your animation
[q][i]Originally posted by: [b][b]_pixel_chick[/b][/b][/i] How do I load the movie without making the user click or do anything?[/q] just write the loadMovie script to the last keyframe, like how you write stop at your frame 35
PS: There is a Media.complete event that is available in Flash MX04 (AKA Flash 7). Just a suggestion, but you might want to check the help files for whichever version of Flash you are using. Just a suggestion. :)
Don't see what you're looking for? Try a search.
|