1 50 51 package org.openlaszlo.iv.flash.api.action; 52 53 import java.io.PrintStream ; 54 import org.openlaszlo.iv.flash.util.*; 55 import org.openlaszlo.iv.flash.parser.*; 56 import org.openlaszlo.iv.flash.api.*; 57 58 61 public class Actions { 62 63 public static final int None = 0x00; 64 public static final int NextFrame = 0x04; 65 public static final int PrevFrame = 0x05; 66 public static final int Play = 0x06; 67 public static final int Stop = 0x07; 68 public static final int ToggleQuality = 0x08; 69 public static final int StopSounds = 0x09; 70 public static final int Add = 0x0A; 71 public static final int Subtract = 0x0B; 72 public static final int Multiply = 0x0C; 73 public static final int Divide = 0x0D; 74 public static final int Equal = 0x0E; 75 public static final int LessThan = 0x0F; 76 public static final int LogicalAnd = 0x10; 77 public static final int LogicalOr = 0x11; 78 public static final int LogicalNot = 0x12; 79 public static final int StringEqual = 0x13; 80 public static final int StringLength = 0x14; 81 public static final int SubString = 0x15; 82 public static final int Pop = 0x17; 83 public static final int Int = 0x18; 84 public static final int Eval = 0x1C; 85 public static final int SetVariable = 0x1D; 86 public static final int SetTargetExpression = 0x20; 87 public static final int StringConcat = 0x21; 88 public static final int GetProperty = 0x22; 89 public static final int SetProperty = 0x23; 90 public static final int DuplicateClip = 0x24; 91 public static final int RemoveClip = 0x25; 92 public static final int Trace = 0x26; 93 public static final int StartDragMovie = 0x27; 94 public static final int StopDragMovie = 0x28; 95 public static final int StringLessThan = 0x29; 96 public static final int Random = 0x30; 97 public static final int MBLength = 0x31; 98 public static final int Ord = 0x32; 99 public static final int Chr = 0x33; 100 public static final int GetTimer = 0x34; 101 public static final int MBSubString = 0x35; 102 public static final int MBOrd = 0x36; 103 public static final int MBChr = 0x37; 104 public static final int GotoFrame = 0x81; public static final int GetURL = 0x83; public static final int WaitForFrame = 0x8A; public static final int SetTarget = 0x8B; public static final int GotoLabel = 0x8C; public static final int WaitForFrameExpression = 0x8D; public static final int PushData = 0x96; 111 public static final int Jump = 0x99; 112 public static final int GetURL2 = 0x9A; 113 public static final int JumpIfTrue = 0x9D; 114 public static final int CallFrame = 0x9E; 115 public static final int GotoExpression = 0x9F; 116 117 public static final int Delete = 0x3A; 119 public static final int Delete2 = 0x3B; 120 public static final int DefineLocal = 0x3C; 121 public static final int CallFunction = 0x3D; 122 public static final int Return = 0x3E; 123 public static final int Modulo = 0x3F; 124 public static final int NewObject = 0x40; 125 public static final int DefineLocal2 = 0x41; 126 public static final int InitArray = 0x42; 127 public static final int InitObject = 0x43; 128 public static final int TypeOf = 0x44; 129 public static final int TargetPath = 0x45; 130 public static final int Enumerate = 0x46; 131 public static final int Add2 = 0x47; 132 public static final int Less2 = 0x48; 133 public static final int Equals2 = 0x49; 134 public static final int ObjectToNumber = 0x4A; 135 public static final int ObjectToString = 0x4B; 136 public static final int PushDuplicate = 0x4C; 137 public static final int StackSwap = 0x4D; 138 public static final int GetMember = 0x4E; 139 public static final int SetMember = 0x4F; 140 public static final int Increment = 0x50; 141 public static final int Decrement = 0x51; 142 public static final int CallMethod = 0x52; 143 public static final int NewMethod = 0x53; 144 public static final int BitAnd = 0x60; 145 public static final int BitOr = 0x61; 146 public static final int BitXor = 0x62; 147 public static final int BitLShift = 0x63; 148 public static final int BitRShift = 0x64; 149 public static final int BitURShift = 0x65; 150 public static final int StoreRegister = 0x87; public static final int ConstantPool = 0x88; public static final int With = 0x94; public static final int DefineFunction = 0x9B; 155 public static final String [] actionsNames = { 156 "None", 157 "NextFrame", 158 "PrevFrame", 159 "Play", 160 "Stop", 161 "ToggleQuality", 162 "StopSounds", 163 "Add", 164 "Subtract", 165 "Multiply", 166 "Divide", 167 "Equal", 168 "LessThan", 169 "LogicalAnd", 170 "LogicalOr", 171 "LogicalNot", 172 "StringEqual", 173 "StringLength", 174 "SubString", 175 "Pop", 176 "Int", 177 "Eval", 178 "SetVariable", 179 "SetTargetExpression", 180 "StringConcat", 181 "GetProperty", 182 "SetProperty", 183 "DuplicateClip", 184 "RemoveClip", 185 "Trace", 186 "StartDragMovie", 187 "StopDragMovie", 188 "StringLessThan", 189 "Random", 190 "MBLength", 191 "Ord", 192 "Chr", 193 "GetTimer", 194 "MBSubString", 195 "MBOrd", 196 "MBChr", 197 "GotoFrame", 198 "GetURL", 199 "WaitForFrame", 200 "SetTarget", 201 "GotoLabel", 202 "WaitForFrameExpression", 203 "PushData", 204 "Jump", 205 "GetURL2", 206 "JumpIfTrue", 207 "CallFrame", 208 "GotoExpression", 209 "Delete", 210 "Delete2", 211 "DefineLocal", 212 "CallFunction", 213 "Return", 214 "Modulo", 215 "NewObject", 216 "DefineLocal2", 217 "InitArray", 218 "InitObject", 219 "TypeOf", 220 "TargetPath", 221 "Enumerate", 222 "Add2", 223 "Less2", 224 "Equals2", 225 "ObjectToNumber", 226 "ObjectToString", 227 "PushDuplicate", 228 "StackSwap", 229 "GetMember", 230 "SetMember", 231 "Increment", 232 "Decrement", 233 "CallMethod", 234 "NewMethod", 235 "BitAnd", 236 "BitOr", 237 "BitXor", 238 "BitLShift", 239 "BitRShift", 240 "BitURShift", 241 "StoreRegister", 242 "ConstantPool", 243 "With", 244 "DefineFunction", 245 }; 246 247 public static final int[] actionsIndexes = { 249 None, 250 NextFrame, 251 PrevFrame, 252 Play, 253 Stop, 254 ToggleQuality, 255 StopSounds, 256 Add, 257 Subtract, 258 Multiply, 259 Divide, 260 Equal, 261 LessThan, 262 LogicalAnd, 263 LogicalOr, 264 LogicalNot, 265 StringEqual, 266 StringLength, 267 SubString, 268 Pop, 269 Int, 270 Eval, 271 SetVariable, 272 SetTargetExpression, 273 StringConcat, 274 GetProperty, 275 SetProperty, 276 DuplicateClip, 277 RemoveClip, 278 Trace, 279 StartDragMovie, 280 StopDragMovie, 281 StringLessThan, 282 Random, 283 MBLength, 284 Ord, 285 Chr, 286 GetTimer, 287 MBSubString, 288 MBOrd, 289 MBChr, 290 GotoFrame, 291 GetURL, 292 WaitForFrame, 293 SetTarget, 294 GotoLabel, 295 WaitForFrameExpression, 296 PushData, 297 Jump, 298 GetURL2, 299 JumpIfTrue, 300 CallFrame, 301 GotoExpression, 302 Delete, 303 Delete2, 304 DefineLocal, 305 CallFunction, 306 Return, 307 Modulo, 308 NewObject, 309 DefineLocal2, 310 InitArray, 311 InitObject, 312 TypeOf, 313 TargetPath, 314 Enumerate, 315 Add2, 316 Less2, 317 Equals2, 318 ObjectToNumber, 319 ObjectToString, 320 PushDuplicate, 321 StackSwap, 322 GetMember, 323 SetMember, 324 Increment, 325 Decrement, 326 CallMethod, 327 NewMethod, 328 BitAnd, 329 BitOr, 330 BitXor, 331 BitLShift, 332 BitRShift, 333 BitURShift, 334 StoreRegister, 335 ConstantPool, 336 With, 337 DefineFunction, 338 }; 339 340 public static String getActionName( int action ) { 341 for( int i=0; i<actionsIndexes.length; i++ ) { 342 if( action == actionsIndexes[i] ) return actionsNames[i]; 343 } 344 return "<unknown>"; 345 } 346 347 } 348 349 | Popular Tags |