I have a "enter site" link set up on an index page. After the SWF finishes playing, I need the visitor to hear a click sound when they click the enter link.
Right now the enter link is controlled by AS3 in the SWF. I cannot figure out how to add the sound. If I just just the properties palette, it causes the whole SWF to loop. If I add some AS3 I found to the final frame of the "enter site" link movie it also causes the SWF to loop.
Can someone help me figure out exactly how to write the AS3 and where to put it in the Flash file?
Flash file is attached.
Thanks in advance.
Adobe FlashApple Software
Last Comment
blue-genie
8/22/2022 - Mon
blue-genie
you can either put the sound in the library or load it at runtime. if it's a small button click sound the library option should work.
import it, give it a class identifier i.e in this case Stop. stick the code in your current click handler.
function soundbutton_Handler (e:MouseEvent):void {
snd.play();
}
needanansweryesterday
ASKER
blue-genie - I appreciate your help.
My problem is I don't know squat about AS and am not a developer, thus, I don't really know what to do with your sage advice.
To make matters worse, I don't even know that I can frame an intelligent question on this subject, but...
the code you gave me - I'm guessing - should either go on the last frame of the "enterlink" movie instance, or on the last frame of the animation, right?
As of now, the last frame of the animation has this code:
import it, give it a class identifier i.e in this case Stop. stick the code in your current click handler.
var snd:Stop= new Stop();
yourexitbtnName.addEventLi
function soundbutton_Handler (e:MouseEvent):void {
snd.play();
}