PDA

View Full Version : media component nightmare


Navarone
10-26-2006, 05:04 PM
I have one instance of the mediacomponent and controller on my stage. I am using this same instance to play all my video. I am using the same code to play each video.

stop();
_global.isPlayIntro = true;
trace("isPlayIntro "+isPlayIntro);
if (isPlayIntro == true) {
_root.intro_mc.gotoAndStop("on");
}
//
myVideo.autoPlay = true;
myVideo.activePlayControl = "play";
myVideo.controllerPolicy = 'on';
myVideo.setMedia("videos/smfg_chapter1_ae500.flv", "FLV");
var myListener = new Object();
myListener.complete = function(eventObject) {
trace("intro media is Finished");
_global.isPlayIntro = false;
myVideo.setMedia("", "");
gotoAndStop("about");
};
myVideo.addEventListener("complete", myListener);


So I have 5 frames labled intro, about, beat, master and why. The code above is in the intro frame. When the listener is complete the trace shows that the intro media is done and the play head jumps to the frame labeled about, when the about media is finished the trace shows that the about media finished, but it won't jump to the frame labeled beat.

I have attached the fla minus the media display and controller, to make the fla work, add a media display give it an instance name of myVideo and add a behavior to the controller to associate the display. You'll have to add your own flvs.

I can't figure out why it won't jump to the next frame. Can anyone help.
:confused: