Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
Sound
This is a discussion on Sound, within the Flash & Multimedia section. This forum and the thread "Sound" are both part of the Designing Your Website category.
![]() ![]() |
Feb 26 2008, 10:17 AM
Post
#1
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 22-February 08 From: Netherlands Member No.: 177 |
Hi,
I need some help on this 1. This is very basic flash i think but i've never done it..I want when u onrelease a button to have a sound. But i dont know the actionsctript. this is the site im working on : http://www.gotoandflash.com/jjw/jjw.html so when I hit eg 'schinveld' i wanna hear my wav. which is in the library. this is my AS in the movieclip so far: CODE stop(); this.onMouseMove = function(){ if(rewind == true){ prevFrame(); } } this.onRollOver = function(){ rewind = false; play(); } this.onRollOut = function(){ rewind = true; } this.onRelease = function(){ _root.gotoAndPlay("schinveld")} Thanks in advance! Marieke |
|
|
Feb 26 2008, 10:38 AM
Post
#2
|
|
|
Fresh Squeezed ![]() ![]() Group: Advisors Posts: 36 Joined: 15-February 08 Member No.: 148 |
Hey there, you'll need something like this...(AS2)
In the Symbol Linkage Properties dialogue box, give the sound in your library an "Identifier" name like "MySound" On your button would be this. CODE this.onRelease { MC = new Sound(this); //creates a new sound object, variable MC.attachSound("MySound"); //attaches the sound to your new sound object and references the Identifier you created in the Symbol Linkage Properties box MC.start(0, 99); //plays da soundz! } Cheers, Scott Hi,
I need some help on this 1. This is very basic flash i think but i've never done it..I want when u onrelease a button to have a sound. But i dont know the actionsctript. this is the site im working on : http://www.gotoandflash.com/jjw/jjw.html so when I hit eg 'schinveld' i wanna hear my wav. which is in the library. this is my AS in the movieclip so far: CODE stop(); this.onMouseMove = function(){ if(rewind == true){ prevFrame(); } } this.onRollOver = function(){ rewind = false; play(); } this.onRollOut = function(){ rewind = true; } this.onRelease = function(){ _root.gotoAndPlay("schinveld")} Thanks in advance! Marieke This post has been edited by Scott: Feb 26 2008, 10:38 AM |
|
|
Feb 26 2008, 11:07 AM
Post
#3
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 22-February 08 From: Netherlands Member No.: 177 |
Thanks Scott, I now have sound,but it keeps repeating itself over and over again. It doesnt stop at all. Not even when i hit another button. It's just a short beep so I only need it to play once. You happen to know how to do that too?
thanks |
|
|
Feb 26 2008, 11:11 AM
Post
#4
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 22-February 08 From: Netherlands Member No.: 177 |
aaaaaaaaaaaaaah i played along a bit with your script and changed the 99 in 1
thanks |
|
|
Feb 26 2008, 04:09 PM
Post
#5
|
|
|
Fresh Squeezed ![]() ![]() Group: Advisors Posts: 36 Joined: 15-February 08 Member No.: 148 |
Yay for intuition! Well done.
Always glad to help. |
|
|
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:






Feb 26 2008, 10:17 AM




