Thursday, September 15, 2005

 

Actionscript AAAAARRRRG!

Yikes! Actionscript is perplexing, even if it looks alot like javascript.

Anyhow I wrote some code for an animation I was doing. Basically when an animated movieclip posing as a button goes through a mouseover, it's supposed to play a sound. Then when the mouse moves out it's supposed to stop that specific sound. The thing is that it just doesn't want to cooperate. So yeah, I go a bit crazy. Then I just go "screw it. I've got other things to worry about."

Well this is what it looks like (provided my memory is good 'nuf):

on (dragOver, moveOver) {
some_sound = new Sound ();
some_sound.attachsound ("whatever");
some_sound.start ();
}
on (dragOut, moveOut) {
some_sound.stop();
}

So specifially it's supposed to kill the sound being played by some_sound. But what it's doing is the action that seems to be what StopAllSounds is supposed to do. Arrrgh!
I don't want the ambient music or whatever to stop, just the noise that the button makes.
Yep, I'm confused.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?