PDA

View Full Version : help with adding sound to movieclip button



teriel
December 14th, 2004, 11:01 AM
I have a movieclip button that I want to add a sound to when press can someone tell me how to do this? The code I have for the contact form is:

stop();
//-----------<send form>------------\\
//-----------</send form>------------\\
//--------------------<submit button AS>---------------------\\
this.contactForm.submitBtn.btnLabel.autoSize = "center";
this.contactForm.submitBtn.btnLabel.text = "submit";
// onRollOver
this.contactForm.submitBtn.onRollOver = function() {
contactForm.submitBtn.gotoAndStop (2);
}
// onRollOut
this.contactForm.submitBtn.onRollOut = function() {
contactForm.submitBtn.gotoAndStop (1);
}
// onRelease
this.contactForm.submitBtn.onRelease = function() {
if (contactForm.userName.text == "" || contactForm.userPhone.text == "" || contactForm.userEmail.text == "" || contactForm.userComments.text == "") {
gotoAndStop("error");
} else {
sendForm();
gotoAndStop("correct");
}
}
//--------------------</submit button AS>---------------------\\


Thanks
teriel

rhamej
December 14th, 2004, 01:13 PM
I have a movieclip button that I want to add a sound to when press can someone tell me how to do this? The code I have for the contact form is:

stop();
//-----------<send form>------------\\
//-----------</send form>------------\\
//--------------------<submit button AS>---------------------\\
this.contactForm.submitBtn.btnLabel.autoSize = "center";
this.contactForm.submitBtn.btnLabel.text = "submit";
// onRollOver
this.contactForm.submitBtn.onRollOver = function() {
contactForm.submitBtn.gotoAndStop (2);
}
// onRollOut
this.contactForm.submitBtn.onRollOut = function() {
contactForm.submitBtn.gotoAndStop (1);
}
// onRelease
this.contactForm.submitBtn.onRelease = function() {
if (contactForm.userName.text == "" || contactForm.userPhone.text == "" || contactForm.userEmail.text == "" || contactForm.userComments.text == "") {
gotoAndStop("error");
} else {
sendForm();
gotoAndStop("correct");
}
}
//--------------------</submit button AS>---------------------\\


Thanks
teriel
Open up the submitBtn and put the sound in the down frame

teriel
December 14th, 2004, 01:36 PM
Open up the submitBtn and put the sound in the down frame
The submitBtn is a movieclip.

teriel

rhamej
December 14th, 2004, 02:15 PM
Then either use the attachSound object, or put the sound in frame two of the movie clip. ;)