diff --git a/trunk/src/com/jpexs/decompiler/flash/action/Action.java b/trunk/src/com/jpexs/decompiler/flash/action/Action.java index 304d2cf93..805b615d6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/Action.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/Action.java @@ -72,8 +72,8 @@ public class Action implements GraphSourceItem { * Names of ActionScript properties */ public static final String[] propertyNames = new String[]{ - "_x", - "_y", + "_X", + "_Y", "_xscale", "_yscale", "_currentframe", @@ -95,6 +95,7 @@ public class Action implements GraphSourceItem { "_xmouse", "_ymouse" }; + public static final List propertyNamesList=Arrays.asList(propertyNames); private static Logger logger = Logger.getLogger(Action.class.getName()); /** diff --git a/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java b/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java index 25b49c4d4..fbe4b9447 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/gui/ActionPanel.java @@ -51,7 +51,7 @@ import jsyntaxpane.DefaultSyntaxKit; public class ActionPanel extends JPanel implements ActionListener { - private boolean debugRecompile = true; + private boolean debugRecompile = false; public LineMarkedEditorPane editor; public LineMarkedEditorPane decompiledEditor; public LineMarkedEditorPane recompiledEditor; diff --git a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java index 41236029b..57c5c1e29 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/parser/script/ActionScriptParser.java @@ -183,8 +183,15 @@ public class ActionScriptParser { } else { if (inMethod) { ret.add(new ActionPush(new RegisterNumber(REGISTER_THIS))); - ret.add(pushConst(s.value.toString())); - ret.add(new ActionGetMember()); + //TODO: Handle properties (?) + if (false) { //Action.propertyNamesList.contains(s.value.toString())) { + ret.add(new ActionPush((Long) (long) (int) Action.propertyNamesList.indexOf(s.value.toString()))); + ret.add(new ActionGetProperty()); + } else { + ret.add(pushConst(s.value.toString())); + ret.add(new ActionGetMember()); + } + } else { ret.add(s.value.toString().equals("trace") ? new ActionPush(s.value.toString()) : pushConst(s.value.toString())); ret.add(new ActionGetVariable()); @@ -201,8 +208,14 @@ public class ActionScriptParser { } s = lex(); expected(s, lexer.yyline(), SymbolType.IDENTIFIER, SymbolType.THIS, SymbolType.SUPER); - ret.add(pushConst(s.value.toString())); - ret.add(new ActionGetMember()); + //TODO: Handle properties (?) + if (false) {//Action.propertyNamesList.contains(s.value.toString())) { + ret.add(new ActionPush((Long) (long) (int) Action.propertyNamesList.indexOf(s.value.toString()))); + ret.add(new ActionGetProperty()); + } else { + ret.add(pushConst(s.value.toString())); + ret.add(new ActionGetMember()); + } s = lex(); } lexer.pushback(s); @@ -475,6 +488,10 @@ public class ActionScriptParser { ret.addAll(value); ret.add(new ActionStoreRegister(((RegisterNumber) ((ActionPush) a).values.get(0)).number)); ret.add(new ActionPop()); + } else if (a instanceof ActionGetProperty) { + ret.remove(ret.size() - 1); + ret.addAll(value); + ret.add(new ActionSetProperty()); } } return ret; @@ -807,6 +824,9 @@ public class ActionScriptParser { if (at instanceof ActionGetVariable) { ret.add(new ActionSetVariable()); } + if (at instanceof ActionGetProperty) { + ret.add(new ActionSetProperty()); + } break; case PARENT_OPEN: //function call List callcmds = new ArrayList();