Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Community Boards > General Chat

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-31-2010, 03:08 PM   #1
alex_tsm1
Registered User
 
Join Date: Dec 2010
Posts: 27
Cool Sound/Song button without Actionscript

Hey guys just want to give this small tip, if you are trying to make a button that starts and stops a sound or a song this is a simple way too do that without having to youse any code, there it goes:


1: draw on one layer a square and a triangle representing the play and stop button

2: register each of them as ex: play_btn and stop_btn(presswing F8 and asigning the button object value)

3:doubleclick on the play button to enter its stage. On the tiemline youll se the up, over, down and hit frames; click on "over" frame and push on the F5 button do the same on the down and hit frames but press F6 this time.

4:select the Down frame and go to the propertys panel.

5: import to the librerary the mp3 or wav sound/songs you want to attach and select it in the sound list menu in the propertys panel and then in the Sync list menu select PLAY

6:do the steps 3-5 for the stop button but this time in the SYNC list menu of the propertys panel select Stop


And thats it press ctrl+enter and test.

If you want to add more songs just give the buttons different instances like play1,2,3,4.... same for stop and attach the diferent sounds or songs like in step 5 and thats all.

Hope you find this usefull, was for me.


(there is one problem with this and it is that if you put more than one sound and you start the second sound without stopping the first the songs solape, and this issue would need some scripting i guess)
alex_tsm1 is offline   Reply With Quote
Old 12-31-2010, 03:14 PM   #2
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,682
Send a message via Skype™ to henke37
Default

Yeah, that method has a lot of missing features, such as the ability to control the sound from scripting, such as the ability to stop it. But also things like knowing the progress and seeking.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 is offline   Reply With Quote
Old 12-31-2010, 03:53 PM   #3
alex_tsm1
Registered User
 
Join Date: Dec 2010
Posts: 27
Default

yea absolutly true but might be usefoul fore some cases, i tryet to set it up differently (see tread: Simple sound issue ), but i`m completely stop because im getting errors other arnīt and dont know what else try

But yes i am trying to deal with it because im missing things like u say sound control, pause, sound avoid sound overlaping and knowing witch track is playing if u could check where im stuck in the other thread ii be thankfoul
alex_tsm1 is offline   Reply With Quote
Old 12-31-2010, 03:55 PM   #4
Mazoonist
Site Contributor
 
Mazoonist's Avatar
 
Join Date: Jun 2006
Posts: 3,160
Send a message via AIM to Mazoonist
Default

It also lacks the ability to pause a sound. You are stuck with the sound always starting from the beginning. Oh well, if that's what you want.

This is the Actionscript 3.0 section of the forum, by the way. People coming here are not looking for ways to avoid using Actionscript.
__________________
My Tutorials * My Website
Mazoonist is offline   Reply With Quote
Old 01-01-2011, 03:24 AM   #5
ASWC
Super Moderator
 
ASWC's Avatar
 
Join Date: Dec 2007
Location: Greenville, SC
Posts: 6,528
Default

Quote:
Originally Posted by Mazoonist View Post
This is the Actionscript 3.0 section of the forum, by the way. People coming here are not looking for ways to avoid using Actionscript.
[moderator] true, well let's send this to the general forum.
__________________
aswebcreations
Super Duper!
ASWC is offline   Reply With Quote
Old 01-01-2011, 03:30 AM   #6
ASWC
Super Moderator
 
ASWC's Avatar
 
Join Date: Dec 2007
Location: Greenville, SC
Posts: 6,528
Default

A lot could be done using simply a sound in the timeline of a graphic. Since a graphic timeline can be sync to a parent movieclip timeline. Stopping the parent will stop the graphic timeline and the embedded sound (if set to streaming). Now that would be your sound pause situation. Same could be done with a movieclip but the timeline of a movieclip has to be stopped directly since movieclips act independently. Better of course would be to handle everything using AS.
__________________
aswebcreations
Super Duper!
ASWC is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:28 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.