fix: fix tellTarget handling on old AS version

This commit is contained in:
Jindra Petřík
2026-04-18 19:14:05 +02:00
parent e5142a45e5
commit 2cade7d8dd
2 changed files with 33 additions and 6 deletions

View File

@@ -627,4 +627,23 @@ public class ActionScript2AssemblerTest extends ActionScript2TestBase {
assertEquals(res, "c += 1;");
}
@Test
public void testTellTarget() {
String res = decompilePcode("SetTarget \"\"\n"
+ "GotoFrame 1\n"
+ "SetTarget \"../test\"\n"
+ "GoToLabel \"MyLabel\"\n"
+ "Play");
res = cleanPCode(res);
assertEquals(res, "tellTarget(\"\")\n"
+ "{\n"
+ "gotoAndStop(2);\n"
+ "}\n"
+ "tellTarget(\"../test\")\n"
+ "{\n"
+ "gotoAndStop(\"MyLabel\");\n"
+ "play();\n"
+ "}");
}
}