PDA

Click to See Complete Forum and Search --> : more actionscripts


Big Perm-dizzle
04-03-2004, 01:48 AM
i have a streaming audio file that I need to have a

stop button the rewinds to the beginning (I GOT THAT COVERED)

I need a PAUSE BUTTON that stops once clicked I need it to change to a play button (both functionally and visually)

now I also need the stop button once clicked to change the play/pause button to the play side...

HELP>>>>>>>>>>

I actually figured out how to make the pause play button switch visually when clicked but not functionally working either of them....i know how to make the work just not the two functions together.....

"In the past couple of weeks your kids have touched me, and i'm pretty sure i've touched them too" - Jack Black (School of Rock)

casedsgn
04-04-2004, 10:05 PM
You just need to create a variable that tracks what state the button is currently in and then in the code on your button, use an if/else statement to dtermine what to do, kind of like this.

CODE ON THE CLIP:
//this code is ran only once when the button clip is loaded to set the intial state
onClipEvent(load){
buttonStop = false;
}

CODE ON THE BUTTON:
//when the button is clicked
on(release){
//if the button is currently displaying the stop features, stop the audio
//then set the buttonStop variable to false
if(buttonStop == true){
soundClip.play();
buttonStop = false;
} else {
//if the button is currently displaying the play features, play the audio
//the set the buttonStop variable to true
soundClip.stop();
buttonStop = true;
}
You could then add the code to change what symbol is showing within your if statements. I'm not sure how you're handling it now, but if you need more help, give me a shout bro.

Big Perm-dizzle
04-04-2004, 11:05 PM
true false statements are called booleans right?

"In the past couple of weeks your kids have touched me, and i'm pretty sure i've touched them too" - Jack Black (School of Rock)

Big Perm-dizzle
04-04-2004, 11:05 PM
like my icon?

"In the past couple of weeks your kids have touched me, and i'm pretty sure i've touched them too" - Jack Black (School of Rock)

casedsgn
04-05-2004, 12:15 AM
yep, they're called booleans.
lol! Yeah, I love it.....you crack me up man.
Does the code make sense?

Big Perm-dizzle
04-05-2004, 02:57 AM
oh it makes total sense reading it....but writing it makes no sense to me...

I can totally understand to write it in my head then I try to do it on the screen and it comes out like MUSH

i just need more experiences and more time messing up and fixing it

I am reading thru flashkit.com and actionscripts.org forums now

"In the past couple of weeks your kids have touched me, and i'm pretty sure i've touched them too" - Jack Black (School of Rock)

casedsgn
04-05-2004, 07:25 PM
Programming is a totally abstract way of thinking. I've found a lot of the things I've wanted to do can be solved with an if loop.
If something is this value, do this...and if it's this value, do this...and if it's this value, do this. It all comes with practice, you'll get it!

lol! Looking down the avatars on this thread makes me think I'm talking to myself!

/emoticons/wacko.gif

Ryan8720
04-05-2004, 08:30 PM
Does actionscript use for and while loops too? Those will also help if it has them.

http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)

C:\DOS
C:\DOS\RUN
RUN DOS RUN

casedsgn
04-05-2004, 08:33 PM
Sure does, actionscript is almost identical to javascript...and then some. /emoticons/smile.gif

Ryan8720
04-05-2004, 08:35 PM
Cool, I could learn it easily then. But I would have to figure out all the actual Flash animation to go with it. LOL

http://edgewebdesign.org/ryan2.gif (http://www.edgewebdesign.org)

C:\DOS
C:\DOS\RUN
RUN DOS RUN

casedsgn
04-05-2004, 08:40 PM
it's not that tough to learn...you'd probably love it.