Flash AS3 undefined property MouseEvent in document class
- by Lee
Hi guys, this is my first time trying to use document classes in AS3 and im struggling.
I am trying to add event listeners to a 2 levels deep movie clip, waiting for a click however i am getting the following error.
ERROR: Access of undefined property MouseEvent
package
{
import flash.display.MovieClip;
import flash.media.Sound;
import flash.media.SoundChannel;
public class game extends MovieClip
{
public var snd_state = true;
public function game()
{
ui_setup();
}
public function ui_setup()
{
ui_mc.toggleMute_mc.addEventListener(MouseEvent.CLICK, snd_toggle);
}
public function snd_toggle(MouseEvent)
{
// 0 = No Sound, 1 = Full Sound
trace("Toggle");
}
}
}