Hello.
Attached i have a small .fla that basically does the following:
- a button is clicked (calling the playSound function)
- the sound is then played, also a small instance of the button is called from the AS library and placed within a sprite that is within a movie clip at the bottom. The event listener is also removed from the main button so it can only be called once.
- when the small instance of the button is pressed (within the sprite) it stops the sound, removes the icon and re enables the buttons event listener.
It all works fine, and it is worth mentioning i am still new to Flash but getting to understand it more (after a little bit of light hearted abuse from a few members :P). What i am struggling to understand is how to ‘streamline’ my code.
I plan on having 20 buttons on the screen, and surely theres an easier way then having 20 functions, all more or less doing the same thing!? Any help would be greatly appreciated.
for the sake of file size, i have removed the sounds and commented out all attributes associated with the sounds, but they are still there so hopefully youll understand what i need (a new sound var, a new sound channel var, sound transform etc)
Thanks guys.