-
Is there an easy way to make a button that toggles from play/pause? Or should I ask, what is the best way.
thanks
s
-
you can do
on (release) {
play ();
}
and
on (release) {
stop ();
}
-
Thank you!!!
To skate342:
Thank you so much, I really love you right now for saving my life with these button codes.
-
Senior Member
If you wanted a single button that toggles between playing and not,
Actionscript Code:
on(press){ if(playing){ this.stop(); }else{ this.play(); } playing=!playing }
OUCHIE,... WOW this thread is back from good old 2002 tisk tisk anna_2010,
-
Hmmmm...
RE: "
OUCHIE,... WOW this thread is back from good old 2002 tisk tisk anna_2010, "
What do you mean by that guardianKitty?
You obviously replied too! LOL But I have to say your timing couldn't have been more perfect! Thanks for your brilliant code also.
-
Senior Member
Originally Posted by anna_2010
RE: "
You obviously replied too!....
Thanks for your brilliant code also.
When your right your right,
And no problem, hope it helped !
-GK
-
Now we are 2010, the first post is in 2002... and this post is still on the top of my list of threads... amazing !!!
-
Hey, can you help me do that but with two button images (play and pause) and toggle them?
-
Hi, I'm new to html, and coding in general.. really hanging for a Dreameaver Catalyst..
Is there a way I can apply this code to html?
just to play/pause via a text button?
Originally Posted by guardiankitty
If you wanted a single button that toggles between playing and not,
Actionscript Code:
on(press){ if(playing){ this.stop(); }else{ this.play(); } playing=!playing }
-
hey people ive got a problem im hoping you can help me solve im trying to make a pause button and im not very good with action script ive made a attempt but it still comes up with two errors can anyone help me get read of them here is the code ive being devolping.
stop();
var interval:Number = setInterval(function () {
trace(interval);
play();
clearInterval(interval);
}, 24000);
-
Senior Member
Your code works for me, if you want it to execute once after 24 secs, just use "setTimeout(functionName,24000);"
Other than that i don't see what you need help with essentially.
-
thanks i knew i was close
-
still one error message ive now got it to this piont
on (release) {
stop();
var interval:Number = setInterval(function () {
trace(interval);
play();
clearInterval(interval);
"setTimeout(functionName,1000);//" ;
}})
and the error message that comes up is
**Error** Scene=Scene 1, layer=pause, frame=20:Line 8: ')' or ',' expected
}})
Total ActionScript Errors: 1 Reported Errors: 1
can anybody give me a hand with that and thanks i dont mean to be a pain.
-
Designer, Programmer, Musician
I don't know what you are trying to do middles, but try this:
Actionscript Code:
onRelease=function() { stop(); function functionName(){ trace(interval); play(); clearInterval(interval); var interval=setInterval(functionName,1000); } }
-
ok that works and im making a duke box just had trouble with my pause button the rest is fine thanks for your help and if you need any in the future ill be happy to help
-
Designer, Programmer, Musician
Nice! Glad I've helped you
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
|