mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 19:04:38 +00:00
try to call flash functions
This commit is contained in:
@@ -49,8 +49,35 @@ public class FlashPlayerPanel extends Panel implements FlashDisplay {
|
||||
private static final int CMD_PLAYING = 8;
|
||||
private static final int CMD_REWIND = 9;
|
||||
private static final int CMD_GOTO = 10;
|
||||
private static final int CMD_CALL = 11;
|
||||
private int frameRate;
|
||||
public boolean functionPlayback = false;
|
||||
|
||||
public synchronized String call(String callString){
|
||||
if (pipe != null) {
|
||||
IntByReference ibr = new IntByReference();
|
||||
Kernel32.INSTANCE.WriteFile(pipe, new byte[]{CMD_CALL}, 1, ibr, null);
|
||||
int callLen=callString.getBytes().length;
|
||||
Kernel32.INSTANCE.WriteFile(pipe, new byte[]{(byte)((callLen>>8) &0xff),(byte)(callLen & 0xff)}, 2, ibr, null);
|
||||
Kernel32.INSTANCE.WriteFile(pipe, callString.getBytes(), callLen, ibr, null);
|
||||
|
||||
byte res[] = new byte[2];
|
||||
if (Kernel32.INSTANCE.ReadFile(pipe, res, 2, ibr, null)) {
|
||||
int retLen = ((res[0] & 0xff) << 8) + (res[1] & 0xff);
|
||||
res = new byte[retLen];
|
||||
if (Kernel32.INSTANCE.ReadFile(pipe, res, retLen, ibr, null)) {
|
||||
String ret=new String(res,0,retLen);
|
||||
return ret;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private synchronized void resize() {
|
||||
if (pipe != null) {
|
||||
IntByReference ibr = new IntByReference();
|
||||
|
||||
Reference in New Issue
Block a user