var page:modPage;
var ListBox:Class; //Important! Declares custom class - actual definition handled by loader
var princeList;
var labels:Array = [
"full shirt",
"one sleeve",
"no sleeves",
"no shirt"
];
function initl(l) {
main = l;
page = new modPage();
main.addPage(page, false);
princeList = new ListBox(200, 96);
main.addIn(princeList, page);
princeList.y = 40;
princeList.x = 150;
for(var t:uint = 0; t < 4; t++) {
princeList.addItem(labels[t], t);
}
princeList.addEventListener("listboxChanged", itemSelect);
//...other stuff
main.unloadMod();
}
function itemSelect(event) {
var item:String = event.listButton.textLabel.tf.text; //get list item label
for each(var i:MovieClip in prince) {
i.gotoAndStop(item); //go to frame label that matches list item label -
} // use timeline and properties window to set frame labels
switch(htorso.currentFrame) { //pick out part that has multiple frames to get current frame number -
case 1: // can also use frame label and do string match
//frame 1 stuff
break;
case 2:
//frame 2 stuff
break;
//...etc
}
}