Hi,
I wonder if someone out there might be able to help me out with an actionscript issue, as I have little clue what I’m doing with it!
I’ve got a Flash file with a video symbol on the stage with the instance name ‘videoPlayer’. I’m controlling video playback using the following script to play the video, check when it finishes, then resume playing the rest of the timeline:
[INDENT]stop();
var duration:Number = 0;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
videoPlayer.attachVideo(ns);
ns.play(“GuidelinesMovieR24.flv”);
ns.onMetaData = function(evt:Object):Void {
duration = evt.duration;
};
ns.onStatus = function(evt:Object):Void {
if (this.time > 0 && this.time >= duration) {
trace(“Video complete”)
delete this.onStatus;
gotoAndPlay(50);
}
}
[/INDENT]I’ve then also got 2 buttons on the stage for pause and play. The pause button is working fine, with the following script attached to it:
[INDENT]on (press) {
ns.pause();
}
[/INDENT]The resume play button is where I’m having trouble. I’ve got the following script attached to it:
[INDENT]on (press) {
ns.resume();
}
[/INDENT]…and it’s doing absolutely nothing. Could someone out there point me in the right direction of getting this to resume playback please?
Thanks in advance,
Dave