|
-
[F8] Play/Pause clip not working with NetStream...
Hey, I've got a play/pause movie on my timeline to control an FLV via NetStream. The idea is to switch from a play symbol to a pause symbol, but it's not working.
Here's the code for the movie:
Code:
playPause.onRelease = function(){
ns.pause();
}
In the play/pause clip, I'm using this:
Code:
stop();
button.onRelease=function(){
if(this._currentframe==1){
stop();
this.gotoAndStop(10);
}else {
play();
this.gotoAndStop(1);
}
}
Clicking on the clip will start and stop the flv just fine, but the symbol switch doesn't happen. When I take out the ns code, just to check and see if the switch will actually work, there's no problem.
What am I doing wrong? How can I get my clip to change from a play to a pause symbol?
-
Got it. Needed to use this on the timeline:
Code:
playPause.onRollOver = function() {
if(this._currentframe == 1) {
this.gotoAndStop("pauseover");
}
else {
this.gotoAndStop("playover");
}
}
playPause.onRollOut = function() {
if(this._currentframe == 10) {
this.gotoAndStop("pause");
}
else {
this.gotoAndStop("play");
}
}
playPause.onRelease = function() {
if(this._currentframe == 10) {
this.gotoAndStop("playover");
ns.pause(true);
}
else {
this.gotoAndStop("pauseover");
ns.pause(false);
}
}
Then I just got rid of my goofy AS in the pause/play clip itself -just used frame labels.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|