Groups | Blog | Home
all groups > flash actionscript > april 2007 >

flash actionscript : FLV Play and pause


Chris McLaughlin
4/30/2007 6:52:18 PM
I have a FLV playback component on the stage with an instance name of
my_FLVplybk. I am trying to pause and play the video using buttons on the
parent timeline, "19mc" which is embedded in the main timeline. The pause
button (for example) targets the main and embeded timeline.

However, when I check the script it reports the FLV playback code as an error.


I'm not sure what I'm missing, but hopefully someone out there can show me the
error of my ways...

Thanks,



Chris



this.onPress = function() {
trace( "vClipState = " + _root.vClipState);
if (_root.vClipState == "playing") {
this._parent.stop();
_root.stop();
this._parent.my_FLVplybk.pause();
this.gotoAndStop("paused");
this._parent.playButton_mc.gotoAndStop("paused");
trace("paused");
Chris McLaughlin
5/1/2007 3:47:00 AM
So, I got this to work but I'm not sure what mad ethe difference. I started
with a blank clip with nothing other than the FLV component and a "pause"
button.

When this worked, I went back to my file; stripped everyhting out, and
rebuilt.

Instead of the variable that I was using, I checked the the FLV was playing by
checking the clip state. I then paused the FLV using: my_FLVplybk.pause(); and
then added the code to stop the parent timeline(s). Finally, I set my variable
(even though it isn't referenced in this mc).

Again, I'm not sure why it worked.
AddThis Social Bookmark Button