0

我有一个 swf 文件,我反编译了它。我得到了 fla 和文件,我正在尝试运行这些文件,但我得到了这些错误

1180: Call to a possibly undefined method li8.
1180: Call to a possibly undefined method li8.
1180: Call to a possibly undefined method li8.
1180: Call to a possibly undefined method si32.
1180: Call to a possibly undefined method li8.
1180: Call to a possibly undefined method li8.
1180: Call to a possibly undefined method li8.
1180: Call to a possibly undefined method li8.
1180: Call to a possibly undefined method si8.

并且这些功能必须在 avm2.intrinsics.memory 这个包中,但不存在我试图更改 SDK 版本 AIR 3.5 ,这个包附带的 3.6 ,3.7 和其他一些,但不是这些功能。问题是什么

4

1 回答 1

1

检查您是否正在使用ASC2.0编译器。

快速内存操作码是ASC2.0编译器的一部分,而不是AIR SDK. 根据您使用的 IDE,avm2.intrinsics.memory操作码方法可能会显示unresolved error在代码编辑器上,但ASC2.0编译器会很好地构建。

以下代码使用AIR SDK 27in进行了测试intelliJ IDEA

package {

import flash.display.Sprite;

import avm2.intrinsics.memory.sf64;
import avm2.intrinsics.memory.lf64;

import flash.system.ApplicationDomain;
import flash.utils.ByteArray;
import flash.utils.Endian;

public class FastMemTest extends Sprite {
  public function FastMemTest() {
    var ba:ByteArray = new ByteArray();
    ba.length = ApplicationDomain.MIN_DOMAIN_MEMORY_LENGTH;
    ba.endian = Endian.LITTLE_ENDIAN;
    ApplicationDomain.currentDomain.domainMemory = ba;

    const addr:int = 0xf0;
    const value:int = 1234;
    sf64(1234, value);
    trace(value.toString(16), ':', lf64(value));
  }
}
}

跟踪输出:

"C:\Program Files\JetBrains\IntelliJ IDEA 2017.2.1\jre64\bin\java.exe" "-Dapplication.home=C:\FlexSDK\AIRSDK_Compiler_27.0.0.132" -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -classpath "C:/FlexSDK/AIRSDK_Compiler_27.0.0.132/lib/legacy/fdb.jar" flex.tools.debugger.cli.DebugCLI
Adobe fdb (Flash Player Debugger) [build development]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
Waiting for Player to connect
"C:\FlexSDK\AIRSDK_Compiler_27.0.0.132\bin\adl.exe" -profile extendedDesktop C:\test\Stage3DTest-app.xml C:\test
Player connected; session starting.

[trace] f0 : 1234
于 2017-10-13T06:39:04.720 回答