UNPKG

@awayfl/avm1

Version:

Virtual machine for executing AS1 and AS2 code

153 lines 3.92 kB
import { AVM1ActionsData } from './context'; export declare const enum ActionCode { None = 0, ActionGotoFrame = 129, ActionGetURL = 131, ActionNextFrame = 4, ActionPreviousFrame = 5, ActionPlay = 6, ActionStop = 7, ActionToggleQuality = 8, ActionStopSounds = 9, ActionWaitForFrame = 138, ActionSetTarget = 139, ActionGoToLabel = 140, ActionPush = 150, ActionPop = 23, ActionAdd = 10, ActionSubtract = 11, ActionMultiply = 12, ActionDivide = 13, ActionEquals = 14, ActionLess = 15, ActionAnd = 16, ActionOr = 17, ActionNot = 18, ActionStringEquals = 19, ActionStringLength = 20, ActionMBStringLength = 49, ActionStringAdd = 33, ActionStringExtract = 21, ActionMBStringExtract = 53, ActionStringLess = 41, ActionToInteger = 24, ActionCharToAscii = 50, ActionMBCharToAscii = 54, ActionAsciiToChar = 51, ActionMBAsciiToChar = 55, ActionJump = 153, ActionIf = 157, ActionCall = 158, ActionGetVariable = 28, ActionSetVariable = 29, ActionGetURL2 = 154, ActionGotoFrame2 = 159, ActionSetTarget2 = 32, ActionGetProperty = 34, ActionSetProperty = 35, ActionCloneSprite = 36, ActionRemoveSprite = 37, ActionStartDrag = 39, ActionEndDrag = 40, ActionWaitForFrame2 = 141, ActionTrace = 38, ActionGetTime = 52, ActionRandomNumber = 48, ActionCallFunction = 61, ActionCallMethod = 82, ActionConstantPool = 136, ActionDefineFunction = 155, ActionDefineLocal = 60, ActionDefineLocal2 = 65, ActionDelete = 58, ActionDelete2 = 59, ActionEnumerate = 70, ActionEquals2 = 73, ActionGetMember = 78, ActionInitArray = 66, ActionInitObject = 67, ActionNewMethod = 83, ActionNewObject = 64, ActionSetMember = 79, ActionTargetPath = 69, ActionWith = 148, ActionToNumber = 74, ActionToString = 75, ActionTypeOf = 68, ActionAdd2 = 71, ActionLess2 = 72, ActionModulo = 63, ActionBitAnd = 96, ActionBitLShift = 99, ActionBitOr = 97, ActionBitRShift = 100, ActionBitURShift = 101, ActionBitXor = 98, ActionDecrement = 81, ActionIncrement = 80, ActionPushDuplicate = 76, ActionReturn = 62, ActionStackSwap = 77, ActionStoreRegister = 135, ActionInstanceOf = 84, ActionEnumerate2 = 85, ActionStrictEquals = 102, ActionGreater = 103, ActionStringGreater = 104, ActionDefineFunction2 = 142, ActionExtends = 105, ActionCastOp = 43, ActionImplementsOp = 44, ActionTry = 143, ActionThrow = 42, ActionFSCommand2 = 45, ActionStrictMode = 137 } export declare class ParsedPushRegisterAction { registerNumber: number; constructor(registerNumber: number); } export declare class ParsedPushConstantAction { constantIndex: number; constructor(constantIndex: number); } export interface ParsedAction { position: number; actionCode: number; actionName: string; args: any[]; knownAction?: boolean; } export interface ArgumentAssignment { type: ArgumentAssignmentType; name?: string; index?: number; } export declare const enum ArgumentAssignmentType { None = 0, Argument = 1, This = 2, Arguments = 4, Super = 8, Global = 16, Parent = 32, Root = 64 } export declare class ActionsDataParser { swfVersion: number; dataId: string; private _stream; private _actionsData; private _lastPushedValue; private _lastDefinedConstantPool; private _initialPosition; private _initialLen; constructor(actionsData: AVM1ActionsData, swfVersion: number); get position(): number; set position(value: number); get eof(): boolean; get length(): number; readNext(): ParsedAction; skip(count: any): void; } //# sourceMappingURL=parser.d.ts.map