Tuesday, November 27, 2007
Actionscript
I've been having some trouble with the actionscript in my flashplayer. Firstly I was trying to find some scrip to make a sound play when a button is pressed. I thought this would be pretty simple but whatever I tried nothing seemed to work. I tried different tutorials and asked for help in my seminars. The simplest solution was to make each sound clip into a movie which, when the button is pressed, it would play. This seems to be working fine and I added a simple "stop();" command to stop the sound from looping. My next problem was making the sounds on the next page play continuously when the button is pressed until another button stopped the sound. This didn't seem to be an easy task either. I thought that if I simply removed the stop command I added in the previous page then it would just play continuously but no, when the stop was removed the button no longer had control of the sound and it just played continuously when the user navigated to the page. When considering many options I decided the best option would be to copy the sound several times into the timeline, this would work better anyway as children tend to leave pages on the computer on and it wouldn't be very good if the sound continued to play for hours and hours. At present the sounds seem to be working fine, for now anyway.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment