Play, Pause and Stop Buttons In Flash
ฝัง
- เผยแพร่เมื่อ 27 ก.พ. 2011
- This tutorial explains about how to create Play, Pause and Stop Buttons in Flash. I hope you Enjoy watching this Video!
This is done using ActionScript 2.0(AS 2.0).
SUBSCRIBE For More Videos!
For Source File, Click Here:-
www30.zippyshare.com/v/6464405...
If you have any doubts you can ask me!
How do you even open the menu to input the codes in? I am using the new version, 2017. So there is not something like that.
hi bro, thanx for the video. I have followed each steps in my project, but the problem is whenever I click a button and go to actions and type the code, it gets overwritten. I mean there is only a single code existing at a time in a layer, although I want different codes for the 3 different buttons. What is causing the problem? Can you help?
Help very good, thanks work working now
big help recommend
Lol
I saw EXACTLY this exercise in class but couldn't remember how to do it... Thanks!
how do i get this to work if I have 20 layers of graphic symbol animation? not just one layer
Thanks so freaking much!
what kind of flash did you used?
its flash8 right
Thank you so much!! i learned it
That was helpful, thanks.
Thanks for Teaching Us
That's great. Thanks!
does this work with frame by frame animations?
Brilliant tutorial! Thanks a lot.
thnx:-)
Thanks for the video (y)
THANK YOU SO MUCH
YOU SAVE MY WORLD!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks
Thank you that was great!!!! MZ
thanks mate... it's work
thanks from Brasil
nice one
thanks.. it works
Thanks for your tutorial..
I have got a problem while scripting the buttons:
what i put is:
on(release){
root.gotoAndPlay("2");
}
(i have testesd with "root" and without it, same happens)
on the frame that my button is.. but i got this error message in console:
"brown, Layer "titulo", Frame 1, Line 1 1086: Syntax error: expecting semicolon before leftbrace
what could it bE?
Thank you in advance...
You're welcome:)
There's a small mistake in the script.
It's "_root" and not "root". So, you can add this actionscript:
on(release){
_root.gotoAndPlay("2");
}
Hope this helps.
Hey, im doing an assignment regarding a trailer. However, the audio won't stop when i pause the clip, please help. How can i make the audio and video pause at the same time? ASAP...T.T thank youu
Hi, to stop the audio completely, you have to add this command to stop button:
stopAllSounds();
this is a nice tutorial..Since I am new in flash i want to learn how to hide the image when you clicked it... is this possible in AS2?
hi its a nice tuts and i learn for the tuts
have a nice day
thnx :)
It works good
thax bro
good tutorial, thanks
How to change your change your channel rack from Dub back to the original channel rack you have
Thanks! :)
play stop on the same button?
Thank you...
Thank You.......
thanx
good tutorial
Hi how to create three JButton using swing in java
Thanks :'D
I was just wondering....What is the code for a restart button on a simple game?
Thank you in Advance
How hard is it to record your voice
FINE Video ...
THANKS A LOT BABY
dude how export ?
but i am using adobe flash cs3 and in which not working F9 button.
or give me right code to close button. According to cs3.
If F9 doesn't work, then from the Windows menu, choose Actions
ok I'll try.
Thank you so much sir
very good
scene=scene, layer=Layer...... Mouse events are permitted only for button instances.. on (release){
play ();
}
pls give me solution...
You are getting this error because you pasted the code on Frame instead of Button. So removed that code from the Frame on a Layer and select the Play button, then open actions panel or press F9 and paste it there.
Hope this helps!
Thanks you so much for thissss >////
Thank u
លូយមែន មេរៀន នេះ
it's very cool tutorial
but how to make the play button (press and hold button) to play and when i release it the animation stop automatic..
Please need your help
thanks
thank you.
you need to create a button first. give some Instance Name for button and the movieclip or graphic on the Properties tab. then click on the first keyframe and type this actionscript on actions panel(F9):
"buttonname".onRollOver = function() {
"movieclipname".play();
}
"buttonname".onRollOut = function() {
"movieclipname".stop();
}
(quotes not included)
SSaipriya Thank you for your help
and i ask if the "movieclip" wasn't clip it just animated Symbol in flash because this script didn't work with me :( ..when i test the movie the animation plays automatic and the button dose not effect at all.
SSaipriya
I got it thanks bro..
this script works as i need
on(press){
Play();
}
on(release){
stop();
}
Amgad Basilious glad you got it:) btw not bro.., sis:-)
Argh what could this possibly mean?
**Error** Scene=Scene 1, layer=Layer 4, frame=1:Line 1: Mouse events are permitted only for button instances
on(release){
Total ActionScript Errors: 1 Reported Errors: 1
You are getting this error coz you have put this code on selecting the frame. Select the button and go to Actions panel and add the code. This will work..
SSaipriya Thanks for the help. Also do u know why sound doesn't come from any of the buttons I create? I mean I follow every step precisely.
LucidTeFlon180 You need to add sound for the buttons. To add sound follow these steps:
- First go to File=>Import=>Import to library. Select your sound in .wav format.
- Go to Window=>Library and right click on your sound. Select Properties.
- Click on Advanced and check on Export for Actionscript. Select OK and close the tab.
- Now on the Library window, select your sound and double-click on the right side of the sound(below linkage).
- Type some name like "abcsound" (don't use quotation marks)
- Now draw some shape on the stage and covert it to button. Select the button and open the Actions panel(F9).
- Add this actionscript:
on (release) {
mySound = new Sound(this);
mySound.attachSound("abcsound");
mySound.start(0, 99);
}
Now the sound will work..
Hope this helps :-)
SSaipriya Thanks for the reply, all is well now. I just reinstalled the program :P
waw i need it thanku so much , please make a video how we link our social network .
where do you out the actionscript?
Joe McDonald In the actions panel. Go to Window=> Actions or press F9.
great
it's pretty nice
but i have one problem
what if i try using movie clips and not graphic clips?
and what if i'm using even sound and not stream?
thanks.
yeah you can use movieclips and add same script.
you can also add sound by importing it to library and placing it on the timeline
thats not what i ment
i tested out the buttons and when i have a movie clip on the scene it just loops itself
and the even sound is just going like we didn't pause the animation
shadowfan1997 you cannot control the sound using this script. You should link your sound clip to actionscript and then add some code.
And, for the movieclip loops, add " stop(); " in the last frame of your movieclip sequence.
but the reason i use movie clips is that they will loop, i usually use graphic clips for non loop animations, but for looping animation like running it just goes on
i kinda though if i should just work with graphic clips only, that way i will not have that problem, but thats not a solution since i use text boxes on my animations, and these text boxes are programed to stop the animation
shadowfan1997 For an animation like running, it loops because the reason is the movieclip should be nested inside other movieclip. Like you have to create a new movieclip and paste this running sequence movieclip inside that. If you still have any problem with that, just send me the source file and i'll figure it out.
sure
I love you forever~
appear within on handler
bro
Total ActionScript Errors: 3 Reported Errors: 3
ano
Awesome, lol..
I commented 3 months ago :D
Man the software scares it's terrifying
On (thanq) {
love();
}
wow nifty ^-^
will this work in flash 8? i wanna know the best version of flash to do this actions......etc work
+Shashwat Anand - Latest Veriosn of flash is ADOBE FLASH CS6 PRO
Yeah this code will work with Flash 8.. The best versions are Flash CS5 and CS6.. You have to choose Actionscript 2.0 on startup before you commence working
so what's the diffrence between action cript 2 and 3? whuck 1 do you prefer
well i don't know the difference but i think you should use the latest one. I means ActionScript3 :)
Or else simply google it.
+Shashwat Anand there are many differences between AS2.0 and 3.0... The method of writing script changes in AS3.0 ... I would suggest you to start with AS2.0 since it's easy to understand the script, then you can work with AS3.0 codes
Please help, I just want to know how to use the sound in the library panel into code like Click to Play/Stop Sound.
+Romnick Refugia Hi, To add sound follow these steps:
- First go to File=>Import=>Import to library. Select your sound in .wav format.
- Go to Window=>Library and right click on your sound. Select Properties.
- Click on Advanced and check on Export for Actionscript. Select OK and close the tab.
- Now on the Library window, select your sound and double-click on the right side of the sound(below linkage).
- Type some name like "abcsound" (don't use quotation marks)
- Now draw some shape on the stage and convert it to button. Select the button and open the Actions panel(F9).
- Add this actionscript: on (release) {
mySound = new Sound(this);
mySound.attachSound("abcsound");
mySound.start(0, 99);
}To stop the sound, create a new button and type this actionscript: on(release){
mySound.stop();
}Hope this helps!
SSaipriya Thank you so much sir :)
+Romnick Refugia It's not sir.. I'm a woman.. Well I'm glad it helped you:)
wow, a women programmer :-)
can you help me add a timer in my quiz game pls??? :)))
THANK U
**Error** Scene=Scene 1, layer=Text, frame=1:Line 2: Statement must appear within on handler
I got this mensage wenever I write.
You get this error when you miss '}' or ')' somewhere.
try using action script 2.0. also, using the script wizard makes it easier for you
Could you do a tutorial using AS3?
:)
bro u found the tetorial?
mujy theek sy nzr ni aa ra :(
mierda quiero AS3!!!!!!
hancok
sa
Skip all the BS and go to 7:50 for the actionscript
Bandir Pola Hoga ainaa thos samne ai Hoga dekte aisi ane😤
hancok