AS2 - Using multiple buttons to play differnet sound clips and text problem
I just learning Flash and I'm having a bit of a problem figuring out how to get this to work. I'm trying to program 4 buttons to play 4 different clips of audio and the corresponding text at the same time.
I was able to use this same set-up to make a similar thing happen with just pictures (no sound or text) and thought it would work again, but I seem to be running into issues with it and when the buttons are clicked nothing plays.
Here is the set-up for the file that I used:
When opened there are 3 layers immediately visible:
- Title = the title text
- masterClipMC = a movie clip with the thumbnails and AS
- bg = the picture being used for the background
In "masterClipMC" there are these 3 layers:
- thumbsAS = action script to make the thumbs change alpha levels so they appear to "light-up" when rolled over. Here's the code form one of the buttons since it was a copy and paste for the rest with just a change for the numbers of each thumbnail:
- thumbs = layer with the actual pictures that were converted to button symbols and they each have the action script on them that is the "gotoAndPlay" that is supposed to make the movie clip "textMC" play, they also have a rollover function in they're button menu that makes the person's name and title appear when they are rolled over. Here is the code I put on each button, of course each one has the corresponding numbers:
- text = layer with the "textMC" which is the movie clip of the sounds and text that is supposed to play when clicked
In "textMC" there are these layers:
- AS = action script layer that has a stop action - "stop();" - on each segment so that all the audio/text dose not play in succession, this is put on the frame after the end of the audio and a frame after the end of the text visibility
- frameLabels = the frame labels for each segment
- audio04 = Audio_04.wav, to play when "thumb04" is pressed
- txt04 = the text that is supposed to play when "thumb04" is clicked
- audio03 = Audio_03.wav, to play when "thumb03" is pressed
- txt03 = the text that is supposed to play when thumb03 is clicked
- audio02 = Audio_02.wav, to play when "thumb02" is pressed
- txt02 = the text that is supposed to play when thumb02 is clicked
- audio01 = Audio_01.wav, to play when "thumb01" is pressed
- txt01 = the text that is supposed to play when "thumb01" is clicked
The text and corresponding audio clips are staggered and each labeled with the corresponding label in the frames label layer.
I was able to have the whole thing play when loaded when I took off the stop actions, or I could have the sound play by placing it on the "down" frame in each button's timeline but then there was no way I could figure out to keep the text visible for the rest of the audio clip.
Any and all help on helping me solve this problem is greatly appreciated!
Thank-you so much!