Flash mc button...
- Started
- Last post
- 4 Responses
- wwfc
Afternoon! Can anyone tell me if the doubleclick function can be applied to a movieclip button?
I have this code:
var sound:Sound = new Sound();
sound.attachSound( "my_sound" );
function playTheSound():Void{
sound.start();
}
myButton.onPress = function(){
playTheSound();
}Which is fine if the user presses the mc button but in this case I need the user to double click to play the sound - what it is correct syntax for applying a double click to an mc button - or is it even possible to do?
Anyone done this before or know of any good tuts or examples to give me some idea of where to start - a straight onDoubleClick doesn't seem to work at all.
Anyone know what does make the double click work? There are no other elements to consider in the swf so if there is a good way of just recognising that the user has doubleclicked on the swf and then play the sound?
Anyone?
- maximillion_0
in AS3
yourBTnMC.addEventListener(Mouse... functionHandler)
- maximillion_0
menuItem.addEventListener[MouseE... menuItemOutHandler]
replace [ with ( and ] with )
- wwfc0
...ffs? that is my theme for today!!!
Thanks maximillion ;-)