Fern2
asked on
When video/flv ends do gotoAndPlay(xxx)
Hi
I have a project and in the project the user clicks a button with the action:"gotoAndPlay(50)" where a FLV file is played.
My problem is that when the flv file ends I need to do the action:"gotoAndPlay(1)"
How can I do this?
I have a project and in the project the user clicks a button with the action:"gotoAndPlay(50)" where a FLV file is played.
My problem is that when the flv file ends I need to do the action:"gotoAndPlay(1)"
How can I do this?
https://www.experts-exchange.com/questions/21791667/Controlling-Flash-FLV-Movie-from-web-page.html#16315428
ASKER
I put this into the frame script
var myPlayerListener:Object = new Object();
myPlayerListener.change = function(eventObj:Object) {
var myPosition:Number = myPlayer.playheadTime;
var myPercentPosition:Number = (myPosition/myPlayer.total Time);
if (myPercentPosition > 90) // When 90% of the video is done start loading another movie
{
trace("Done");
}
};
myPlayer.addEventListener( "change", myPlayerListener);
name the flv file "myPlayer" in the properies of the flv file.
The script doesnt work. What am I doing wrong?
var myPlayerListener:Object = new Object();
myPlayerListener.change = function(eventObj:Object) {
var myPosition:Number = myPlayer.playheadTime;
var myPercentPosition:Number = (myPosition/myPlayer.total
if (myPercentPosition > 90) // When 90% of the video is done start loading another movie
{
trace("Done");
}
};
myPlayer.addEventListener(
name the flv file "myPlayer" in the properies of the flv file.
The script doesnt work. What am I doing wrong?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
thx again you are a true wizard of flash.
bytheway...is that you in the video :)
bytheway...is that you in the video :)
thanx for the appreciation
no.. not me.. :)
no.. not me.. :)