Link to home
Start Free TrialLog in
Avatar of bsg999
bsg999Flag for United States of America

asked on

GetURL not working after last video completes

I am having trouble redirecting to a new web page after playing 11 Flash videos automatically.  The videos play correctly.  After the last  one completes it sits at a black video box.   I have included my action script.  Could someone tell me what's missing or how this should be done?

Thanks.
import mx.video.*;
 
var movieClipArray:Array = new Array();
 
 
movieClipArray.push("the case being built.flv");
movieClipArray.push("fact 1.flv");
movieClipArray.push("fact 2.flv");
movieClipArray.push("fact 3.flv");
movieClipArray.push("fact 4.flv");
movieClipArray.push("fact 5.flv");
movieClipArray.push("fact 6.flv");
movieClipArray.push("fact 7.flv");
movieClipArray.push("fact 8.flv");
movieClipArray.push("fact 9.flv");
movieClipArray.push("Case Closed.flv");
 
var i_currentVideo = 0;
 
var firstVideo:String = movieClipArray[i_currentVideo];
my_FLVPlybk.contentPath = firstVideo; 
 
my_FLVPlybk.play();
 
var listenerObject:Object = new Object();
// listen for complete event; play new FLV
listenerObject.complete = function(eventObject:Object):Void {
 
if( i_currentVideo < (movieClipArray.length-1) ) //if less than length of
{
i_currentVideo++;
var newMovie:String = movieClipArray[i_currentVideo];
my_FLVPlybk.contentPath = newMovie;
my_FLVPlybk.play();
}
 else  
 getURL("toc1.html", "_blank");
 
};
 
my_FLVPlybk.addEventListener("complete", listenerObject);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Aneesh Chopra
Aneesh Chopra
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bsg999

ASKER

Thanks for your prompt response.  All is working well.