Discussion Forums > The Lounge
Flash CS4 Actionscript halp plauks!
(1/1)
failboat:
So, i am currently engaged in a silly little flash project, and i have trouble with this actionscript shit.
I have this button, with the script
stop()
playButton.addEvent Listener ( MouseEvent.CLICK, myStartHandler )
function myStartHandler( evt ){
gotoAndPlay(1);
}
but that only makes the small clip play once everytime i click it, and nor does it restart the music.
The clip is consisting of two pictures, one regular one and one gloomy "glow" one, the glowing one is fading and "pulsating/pulsing" (lol, unno the right word for it), and i got a audio layer for it to.
The playback works fine without the actionscript, the movie pulses to the music as i want it to, but i need to make a start button for the whole thing.
So, anyone with earlier experience in flash cs4 which can help me out?
Xiong Chiamiov:
Uh, why didn't you try a programming forum? Or a programming-related irc channel? Or StackOverflow? Or someplace that is vaguely related to programming in any way?
luciusrenata:
Ummm... dont put the sound on the timeline (assuming thats what you did)
If you want to use eventhandling, it may be better to instantiate a sound object in actionscript and then use the stop and start properties of that class.
also I agree with Xiong, this is probably not the best place for great advices on this subject, so caveat emptor, i am not sure if my solution will help, or just make your computron asplode... ;D
good luck!
also check the AS4 code reference documents. don't bother with the CS4 help cos it's poopcrap.
Navigation
[0] Message Index
Go to full version