rotsee
10-31-2008, 01:23 PM
Hello,
I'm playing a FLV-file in my flash-movie, using FLVPlayback (compiled clip). Now I need to execute some code when the movie stops och when the user navigates to another frame using any of a number of buttons. I googled and found a lot of instructions that all looked something like this (my code now):
var enventListener:Object = new Object();
enventListener.completed = function(eventObject:Object):Void{
trace("THIS NEVER HAPPENS!");
}
_root.Kapitel1_film.addEventListener("completed",eventListener);
where Kapitel1_film is my flv-clip. I tried all different events I could come up with (stopped, statusChange, etc), but nothing ever happens.
I can access the clip, though. E.g. _root.Kapitel1_film.height will give a correct value.
Trace(_root.Kapitel1_film.state) used in the same frame gives 'disconnected', otherwise 'undefined'. All code is in the same frame and same scene as the embedded flv. I'm a newbie here, so I'm probably missing something obvious. Thankful for any hint.
I'm playing a FLV-file in my flash-movie, using FLVPlayback (compiled clip). Now I need to execute some code when the movie stops och when the user navigates to another frame using any of a number of buttons. I googled and found a lot of instructions that all looked something like this (my code now):
var enventListener:Object = new Object();
enventListener.completed = function(eventObject:Object):Void{
trace("THIS NEVER HAPPENS!");
}
_root.Kapitel1_film.addEventListener("completed",eventListener);
where Kapitel1_film is my flv-clip. I tried all different events I could come up with (stopped, statusChange, etc), but nothing ever happens.
I can access the clip, though. E.g. _root.Kapitel1_film.height will give a correct value.
Trace(_root.Kapitel1_film.state) used in the same frame gives 'disconnected', otherwise 'undefined'. All code is in the same frame and same scene as the embedded flv. I'm a newbie here, so I'm probably missing something obvious. Thankful for any hint.