mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-13 16:48:13 +00:00
Fixed AS1/2 - direct editation - gotoAndPlay/Stop with scenebias
This commit is contained in:
@@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS1/2 - direct editation - allow call on numbers, boolean, etc.
|
||||
- AS1/2 - direct editation - try..finally without catch clause
|
||||
- AS1/2 - GotoFrame2 - scene bias is first
|
||||
- AS1/2 - direct editation - gotoAndPlay/Stop with scenebias
|
||||
|
||||
## [14.6.0] - 2021-11-22
|
||||
### Added
|
||||
|
||||
@@ -805,16 +805,24 @@ public class ActionScript2Parser {
|
||||
ret = new GetURL2ActionItem(null, null, url, target, getuMethod);
|
||||
break;
|
||||
case GOTOANDSTOP:
|
||||
case GOTOANDPLAY:
|
||||
SymbolType gtKind = s.type;
|
||||
expectedType(SymbolType.PARENT_OPEN);
|
||||
GraphTargetItem gtsFrame = expression(inFunction, inMethod, inTellTarget, true, variables, functions, false, hasEval);
|
||||
int gtsSceneBias = -1;
|
||||
s = lex();
|
||||
if (s.type == SymbolType.COMMA) { //Handle scene?
|
||||
lex();
|
||||
if ((gtsFrame instanceof DirectValueActionItem) && (((DirectValueActionItem) gtsFrame).value instanceof Long)) {
|
||||
gtsSceneBias = (int) (long) (Long) ((DirectValueActionItem) gtsFrame).value;
|
||||
} else {
|
||||
throw new ActionParseException("Scene bias must be number", lexer.yyline());
|
||||
}
|
||||
|
||||
gtsFrame = expression(inFunction, inMethod, inTellTarget, true, variables, functions, false, hasEval);
|
||||
} else {
|
||||
lexer.pushback(s);
|
||||
}
|
||||
ret = new GotoFrame2ActionItem(null, null, gtsFrame, false, false, 0);
|
||||
ret = new GotoFrame2ActionItem(null, null, gtsFrame, gtsSceneBias != -1, gtKind == SymbolType.GOTOANDPLAY, gtsSceneBias);
|
||||
expectedType(SymbolType.PARENT_CLOSE);
|
||||
break;
|
||||
case NEXTFRAME:
|
||||
@@ -948,20 +956,6 @@ public class ActionScript2Parser {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GOTOANDPLAY:
|
||||
expectedType(SymbolType.PARENT_OPEN);
|
||||
GraphTargetItem gtpFrame = expression(inFunction, inMethod, inTellTarget, true, variables, functions, false, hasEval);
|
||||
s = lex();
|
||||
if (s.type == SymbolType.COMMA) { //Handle scene?
|
||||
lex();
|
||||
gtpFrame = expression(inFunction, inMethod, inTellTarget, true, variables, functions, false, hasEval);
|
||||
} else {
|
||||
lexer.pushback(s);
|
||||
}
|
||||
ret = new GotoFrame2ActionItem(null, null, gtpFrame, false, true, 0);
|
||||
expectedType(SymbolType.PARENT_CLOSE);
|
||||
break;
|
||||
|
||||
case REMOVEMOVIECLIP:
|
||||
expectedType(SymbolType.PARENT_OPEN);
|
||||
ret = new RemoveSpriteActionItem(null, null, (expression(inFunction, inMethod, inTellTarget, true, variables, functions, false, hasEval)));
|
||||
|
||||
Reference in New Issue
Block a user