okay. say you’re making a game where you design your character, and there’s a button to change his hairstyle. the code for the btn is on the first frame of the movie. i have messed around with this code for hours and can’t seem to find what’s wrong with it! for some reason, when i test the movie and click the btn, the hair mc doesn’t change to the next frame.
here is my code:
var hairStyle:Array = new Array (1,2,3,4,5);
var i:Number = 0;
_root.nextHair_btn.onRelease = function () {
if (i < hairStyle.length - 1) {
i++;
}
else {
i = 0;
}
}
onEnterFrame=function(){
hairStyle = ;
this.player.head.hair.gotoAndStop((hairStyle));
}
if anyone can fix this please let me know. any help would be appreciated.