I sat here for an hour trying to figure out what's wrong with it.
var clicked =MouseEvent.CLICK
var buttons = new Array(ClothingButton, ColourButton, StatButton, BioButton);
for (var a=0; a<buttons.length; a++) {
buttons [a].buttonMode=true
buttons [a].addEventListener(clicked,buttonClick);
}
function buttonClick(e:Event) :void {
switch (e.target.name) {
case "ClothingButton" :
Clothing.visible = !Clothing.visible
break;
case "ColourButton" :
ColourRef.visible = !ColourRef.visible
break;
case "StatButton" :
Stats.visible = !Stats.visible
break;
case "BioButton" :
BioInfo.visible = !BioInfo.visible
break;
}
}
When I debug the movie it gives me this error;
Attemping to launch and connect to Player using URL C:\Users\Karl\Desktop\New folder (2)\Furaffinity\Commissions\Refs\Amadi\AmadiRefAnimated - experiment.swf
[SWF] C:\Users\Karl\Desktop\New folder (2)\Furaffinity\Commissions\Refs\Amadi\AmadiRefAnimated - experiment.swf - 444925 bytes after decompression
ReferenceError: Error #1056: Cannot create property buttonMode on flash.display.SimpleButton.
at AmadiRefAnimated_fla::MainTimeline/AmadiRefAnimated_fla::frame1()[AmadiRefAnimated_fla.MainTimeline::frame1:38]
I very new at this and my Dyslexia makes it even harder, i'm assuming it's something stupidly simple.