Fixed AS1/2 - on keypress key escaping

This commit is contained in:
Jindra Petřík
2021-11-29 12:11:25 +01:00
parent 0ef76b8860
commit 8e79af0bd4
3 changed files with 5 additions and 3 deletions

View File

@@ -306,7 +306,7 @@ public class BUTTONCONDACTION implements ASMSource, Serializable {
if (asFilename) {
events.add("keyPress " + Helper.makeFileName(CLIPACTIONRECORD.keyToString(condKeyPress).replace("<", "").replace(">", "")) + "");
} else {
events.add("keyPress \"" + CLIPACTIONRECORD.keyToString(condKeyPress) + "\"");
events.add("keyPress \"" + Helper.escapeActionScriptString(CLIPACTIONRECORD.keyToString(condKeyPress)) + "\"");
}
}
String onStr = "";

View File

@@ -12,7 +12,8 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
* License along with this library.
*/
package com.jpexs.decompiler.flash.types;
import com.jpexs.decompiler.flash.types.annotations.Conditional;
@@ -204,7 +205,7 @@ public class CLIPEVENTFLAGS implements Serializable {
if (asFileName) {
onList.add("keyPress " + Helper.makeFileName(CLIPACTIONRECORD.keyToString(key).replace("<", "").replace(">", "")) + "");
} else {
} else {
onList.add("keyPress \"" + Helper.escapeActionScriptString(CLIPACTIONRECORD.keyToString(key)) + "\"");
}
}
if (clipEventDragOut) {