[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 448
  • Last Modified:

Help With Listener and FLV

I'm trying to tell when my FLV is completed playing. I have a one frame flash doc with the FLVPlayback instance in the root and named correctly.

I have this in the timeline:

var MyListener = new Object();
myListener.end = function(eventObject):Void
{
      trace("video ended");
      trace(eventObject.target);
      trace(eventObject.type);
      
}

_root.myDisplay.addEventListener("end",myListener);

It doesn't work. Any ideas on what I'm doing wrong?

0
clickclickbang
Asked:
clickclickbang
  • 2
1 Solution
 
blue-genieCommented:
myDisplay.addEventListener("end", completeListener);
function completeListener(evt_obj:Object):Void {
     trace("video ended");
     trace(eventObject.target);
     trace(eventObject.type);
}

blu
0
 
blue-genieCommented:
wait wait,
change that "end" to complete

myDisplay.addEventListener("complete", completeListener);
function completeListener(evt_obj:Object):Void {
trace("video ended");
trace(eventObject.target);
 trace(eventObject.type);
      
}
0
 
clickclickbangAuthor Commented:
Those viewing PAQ please make note of code change in the second post....
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now