Hello,
I’m new to all of this. I have a play/pause toggle button that is working. The thing is, I also have a preloader before the video begins playing on the timeline. When the video has stopped playing and I want it to replay again, how can I make it start from where the video begins and not at the very beginning where the preloader is.
code for the play/pause button:
on (release){
_root.toggleMe();
theVideo.play();
}
code on timeline:
var isPlaying:Boolean = false;
function toggleMe():Void {
if (isPlaying) {
stop();
isPlaying = false;
} else {
play();
isPlaying = true;
}
}
I tried using this code for the play/pause button to see if replays where the video is but it doesn’t work:
on (release) {
if (_root.toggleMe() == false)
{
_root.toggleMe() == false;
theVideo.play();
}
else {
_root.toggleMe() == true;
gotoAndPlay(“replay”);
}
}