Groups | Blog | Home
all groups > flash actionscript > august 2007 >

flash actionscript : FLVPlayback: AS 2 or AS 3?



masterkrang
8/14/2007 8:53:45 PM
Flash documentation has seriously been driving me crazy at work...

If I import a video (as progressive download), into an AS 3.0 document, how do
I control the video? I just want to set up an event listener. I don't want to
write code in files i work with with AS 2 anymore, especially since AS2 seems
to be getting phased out.



kglad
8/14/2007 9:05:11 PM
masterkrang
8/14/2007 9:54:37 PM
thanks kglad for the response.

maybe i should explain better the issue i'm having...

i looked up the FLVPlayback class in the AS 3 docs and it says that the
addEventListener method is not allowed. What i'm trying to do is add an event
listener to respond to cue point events. i'm able to do it in AS 2 fine, but i
haven't been using AS 2 lately, and i don't want to switch back and forth
anymore.

i'm starting to think that this might be a pain to do in AS 3...

if you can point me in the right direction for adding an event listener to the
FLVPlayback instance that responds to cuepoint events (for AS3) that would be
awesome. otherwise it's back to AS2 :(

thanks


kglad
8/14/2007 10:39:15 PM
for example:



import fl.video.VideoEvent;
import fl.video.MetadataEvent;

function f1(evt:VideoEvent) {
trace("Done");
}
flvPB.addEventListener(VideoEvent.COMPLETE,f1,false, 0, true);

function f2(evt:MetadataEvent) {
trace(evt.info);
}
flvPB.addEventListener(MetadataEvent.CUE_POINT,f2,false, 0, true);
masterkrang
8/14/2007 11:11:55 PM
kglad
8/15/2007 12:13:17 AM
AddThis Social Bookmark Button