...

View Full Version : play/pause code isnt cooperating



darnen101
04-09-2008, 08:25 PM
Hey all- trying to make a play/pause button here. I assumed the code would be simple.. its all a self contained flash file- no outside files to be called upon or anything like that.. just a simple timeline control. However, the code I'm using works, but not til the SECOND click and i'm not sure why. Any thoughts?

on(release){
if(!playing){
//if NOT playing
playing = true;
//playing is set true
play();
//play
}else {
//otherwise(if playing)
stop();
//stop
playing = false;
//playing is set false
}
}

darnen101
04-09-2008, 08:29 PM
nvm- forgot to define playing as true in the beginning. looks like it works now. hope i didnt waste anyones time :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum