Hello all,
I am very new to flash. As in... Just been using it since the beginning of this semester. We just started sound, and as our assignment, we have to create a sound board with at least 5 different buttons with 5 different sounds.
My problem is, I'm having no trouble getting -one- sound to play, but when I try to go on to create a second button with an all NEW sound, this newest sound proceeds to override the FIRST sound. (IE: I push the first button, and instead of the sound I assigned it, it plays the sound assigned to button #2.)
I'm not sure if this is a problem in my timeline or layers, but it's really throwing me through a loop and I cannot for the life of me figure out what's wrong with it. I have tried using the actionscript:
Then proceeded to write the same rule just after it (in the same AS box), but with the new instance names for buttons and identifier for sound.//creates a variable to hold our new sound
var log = new Sound(this);
/*attaches the sound to our variable via the linkage identifer we assigned in the library*/
log.attachSound("missed_you");
/*will start the audio playing without input from the user- accepts 2 parameters
log.start(how long to wait before playing in miliseconds, how many time does the sound play)
if you DO NOT want the audio to play without user input DO NOT include line 8*/
//
/* create 2 buttons on the stage to control the audio playback
instance name them logStart_btn and logStop_btn
*/
logStartMissed_btn.onRelease = function()
{
log.start(0,1);
};
logStopMissed_btn.onRelease = function()
{
log.stop();
I have also tried the method of putting the sound directly onto the button timeline (on the 'down' frame), but even THEN it overrides.
Does anyone have any clue what I'm doing wrong??


Reply With Quote


Bookmarks