Hi all, this is first thread here so hello!
I used David Stiller’s tutorial for loading an external FLV using NetStream. I have it loading in the background, and playing as an ambiance to the website.
My predicament is that I’m using two buttons / instances for the pause & play feature, but it is not working for the play. It pauses just fine, but then when you hit play, it just restarts the movie. It works correctly when I use only one button, and one instance. But I need the two buttons so that I can fade the background in and out, and fade the on/off button in and out. Here’s the setup:
[LEFT]_root level has an MC instance called [FONT=Fixedsys]bgVidContent[/FONT], which has the video and a MC graphic that is white and fades in and out to cover the video. The other _root MC is one called [FONT=Fixedsys]on_off[/FONT], inside of which houses the load FLV code, and the buttons [FONT=Fixedsys]playBtn [/FONT]and [FONT=Fixedsys]pauseBtn[/FONT].
Here’s the code:
[LEFT]inside [FONT=Fixedsys]on_off
[FONT=Arial][COLOR=Red]// loadFLV
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
_root.bgVidContent.mainBg_vid.attachVideo(ns);
ns.play(“flvs/07229 flipped.flv”);
// pauseFLV
pauseBtn.onRelease = function() {
ns.pause(true);
}
playBtn.onRelease = function() {
ns.pause(false);
}[/COLOR][/FONT]
[/FONT][/LEFT]
[/LEFT]
the [FONT=Fixedsys]pauseBtn [/FONT]code:
[LEFT][FONT=Arial][COLOR=Red]on(release) {
this.gotoAndPlay(“2”);
this._parent.bgVidContent.fadeInOut_switch.gotoAndPlay(“2”);
}[/COLOR][/FONT]
[/LEFT]
the [FONT=Fixedsys]playBtn [/FONT]code:
[LEFT][FONT=Arial][COLOR=Red]on(release) {
this.gotoAndPlay(“20”);
this._parent.bgVidContent.fadeInOut_switch.gotoAndPlay(“16”);
}[/COLOR][/FONT]
[/LEFT]
*I would provide an .fla or image but it is client work :shh:
*
Thanks for all your help!
+Chris