Skip to main content
Participating Frequently
October 6, 2008
Question

btns with sound different in as3?

  • October 6, 2008
  • 4 replies
  • 414 views
In earlier versions of flash, I simply add the sound inside the button on a new layer setting the sync to event. When I use this same method in AS3, the overstate sound plays on the downstate as well. I guess one answer would be to just not put sound on the downstate. Listen closely and you can tell. The third button makes it very obvious. The only difference in these two files are the text that identifies the actionscript and the publish settings. Am I supposed to use actionscript to attach the sound when using AS3?

Here are the files.

http://www.pixelprof.com/images/btn_sound_as2.swf
http://www.pixelprof.com/images/btn_sound_as3.swf

right-click and save target:
http://www.pixelprof.com/images/btn_sound_as2.fla
http://www.pixelprof.com/images/btn_sound_as3.fla
This topic has been closed for replies.

4 replies

kglad
Community Expert
Community Expert
October 6, 2008
you're welcome.
mdharmanAuthor
Participating Frequently
October 6, 2008
Great. Just what I needed. Thanks so much.
mdharmanAuthor
Participating Frequently
October 6, 2008
So can you tell me the code for a simple rollover sound? When I try to set the linkage, I get errors.
kglad
Community Expert
Community Expert
October 6, 2008
:

kglad
Community Expert
Community Expert
October 6, 2008
you can control your sound more precisely using actionscript.