Converting AS2 to AS3 and running into errors
I am working on a project for work and I don't have anyone to go to with this issue that would actually know. I am currently converting a clients file from AS2 to AS3 in order to run in our specific platform and template. I have gotten pretty far but I am stuck here. I am getting an "Error 1152: A conflict exists with inherited definition flash.display.MovieClip.currentLabel in namespace public. (referring to "var currentLabel:Number = 0;" And if you see any other errors below please let me know! Thank you so much for your help and time in advance. I can use anything I can get! ![]()
var labelArr:Array = ["un","deux","trois","quatre"];
var currentLabel:Number = 0;
function NEXT(event:MouseEvent):void
{
if (currentLabel < labelArr.length - 1) {
currentLabel++;
gotoAndPlay(labelArr[currentLabel]);
}
else{
//whatever you want .. like jump back to the the beginning
currentLabel = 0;
gotoAndPlay(labelArr[currentLabel]);
}
}
next_btn.addEventListener(MouseEvent.CLICK, NEXT);
function PREV(event:MouseEvent):void
{
if (currentLabel > 0) {
currentLabel--;
gotoAndPlay(labelArr[currentLabel]);
}
else{
//whatever you want .. like jump to the end.
currentLabel = labelArr.length - 1;
gotoAndPlay(labelArr[currentLabel]);
}
}
prev_btn.addEventListener(MouseEvent.CLICK, PREV);
