Converting AS3 to AS2, mouse event
Does anyone know how to convert this code to AS2, I need it to work with my AS2 component:
button_instance.addEventListener(MouseEvent.CLICK,loadNewXML)
button_instance2.addEventListener(MouseEvent.CLICK,loadNewXML)
function loadNewXML(e:MouseEvent):void{
switch(e.target)
case button_instance:
myGallery.contentXML = "content.xml";
break;
case button_instance2:
myGallery.contentXML = "yourNewXmlLocation2.xml";
break;
}
The error that I'm getting is The class or interface 'MouseEvent'could not be loaded (line 4)
and '{' expected (line 6)