+ if(!a)
+ { len = 0;
+ oplen = 0;
+ a = a2;
+ while(a && a!=a1) {
+ len -= ActionTagSize(a);
+ oplen --;
+ a = a->next;
+ }
+ if(!a) {
+ fprintf(stderr, "action_fixjump: couldn't find second tag\n");
+ return;
+ }
+ len -= ActionTagSize(a);
+ oplen --;
+ }
+
+ if (a1->op == ACTION_IF || a1->op == ACTION_JUMP)
+ {
+ *(U16*)(a1->data) = SWAP16(len);
+ }
+ else if(a1->op == ACTION_WAITFORFRAME)
+ {
+ ((U8*)(a1->data))[2] = oplen;
+ }
+ else if(a1->op == ACTION_WAITFORFRAME2)
+ {
+ ((U8*)(a1->data))[0] = oplen;
+ }
+
+}
+
+
+void action_NextFrame() {swf_AddActionTAG(ACTION_NEXTFRAME, 0, 0);}
+void action_PreviousFrame() {swf_AddActionTAG(ACTION_PREVIOUSFRAME, 0, 0);}
+void action_Play() {swf_AddActionTAG(ACTION_PLAY, 0, 0);}
+void action_Stop() {swf_AddActionTAG(ACTION_STOP, 0, 0);}
+void action_ToggleQuality() {swf_AddActionTAG(ACTION_TOGGLEQUALITY, 0, 0);}
+void action_StopSounds() {swf_AddActionTAG(ACTION_STOPSOUNDS, 0, 0);}
+void action_Add() {swf_AddActionTAG(ACTION_ADD, 0, 0);}
+void action_Subtract() {swf_AddActionTAG(ACTION_SUBTRACT, 0, 0);}
+void action_Multiply() {swf_AddActionTAG(ACTION_MULTIPLY, 0, 0);}
+void action_Divide() {swf_AddActionTAG(ACTION_DIVIDE, 0, 0);}
+void action_Equals() {swf_AddActionTAG(ACTION_EQUALS, 0, 0);}
+void action_Less() {swf_AddActionTAG(ACTION_LESS, 0, 0);}
+void action_And() {swf_AddActionTAG(ACTION_AND, 0, 0);}
+void action_Or() {swf_AddActionTAG(ACTION_OR, 0, 0);}
+void action_Not() {swf_AddActionTAG(ACTION_NOT, 0, 0);}
+void action_StringEquals() {swf_AddActionTAG(ACTION_STRINGEQUALS, 0, 0);}
+void action_StringLength() {swf_AddActionTAG(ACTION_STRINGLENGTH, 0, 0);}
+void action_StringExtract() {swf_AddActionTAG(ACTION_STRINGEXTRACT, 0, 0);}
+void action_Pop() {swf_AddActionTAG(ACTION_POP, 0, 0);}
+void action_ToInteger() {swf_AddActionTAG(ACTION_TOINTEGER, 0, 0);}
+void action_GetVariable() {swf_AddActionTAG(ACTION_GETVARIABLE, 0, 0);}
+void action_SetVariable() {swf_AddActionTAG(ACTION_SETVARIABLE, 0, 0);}
+void action_SetTarget2() {swf_AddActionTAG(ACTION_SETTARGET2, 0, 0);}
+void action_StringAdd() {swf_AddActionTAG(ACTION_STRINGADD, 0, 0);}
+void action_GetProperty() {swf_AddActionTAG(ACTION_GETPROPERTY, 0, 0);}
+void action_SetProperty() {swf_AddActionTAG(ACTION_SETPROPERTY, 0, 0);}
+void action_CloneSprite() {swf_AddActionTAG(ACTION_CLONESPRITE, 0, 0);}
+void action_RemoveSprite() {swf_AddActionTAG(ACTION_REMOVESPRITE, 0, 0);}
+void action_Trace() {swf_AddActionTAG(ACTION_TRACE, 0, 0);}
+void action_StartDrag() {swf_AddActionTAG(ACTION_STARTDRAG, 0, 0);}
+void action_EndDrag() {swf_AddActionTAG(ACTION_ENDDRAG, 0, 0);}
+void action_StringLess() {swf_AddActionTAG(ACTION_STRINGLESS, 0, 0);}
+void action_RandomNumber() {swf_AddActionTAG(ACTION_RANDOMNUMBER, 0, 0);}
+void action_MBStringLength() {swf_AddActionTAG(ACTION_MBSTRINGLENGTH, 0, 0);}
+void action_CharToAscii() {swf_AddActionTAG(ACTION_CHARTOASCII, 0, 0);}
+void action_AsciiToChar() {swf_AddActionTAG(ACTION_ASCIITOCHAR, 0, 0);}
+void action_GetTime() {swf_AddActionTAG(ACTION_GETTIME, 0, 0);}
+void action_MBStringExtract() {swf_AddActionTAG(ACTION_MBSTRINGEXTRACT, 0, 0);}
+void action_MBCharToAscii() {swf_AddActionTAG(ACTION_MBCHARTOASCII, 0, 0);}
+void action_MBAsciiToChar() {swf_AddActionTAG(ACTION_MBASCIITOCHAR, 0, 0);}
+void action_Delete() {swf_AddActionTAG(ACTION_DELETE, 0, 0);}
+void action_Delete2() {swf_AddActionTAG(ACTION_DELETE2, 0, 0);}
+void action_DefineLocal() {swf_AddActionTAG(ACTION_DEFINELOCAL, 0, 0);}
+void action_CallFunction() {swf_AddActionTAG(ACTION_CALLFUNCTION, 0, 0);}
+void action_Return() {swf_AddActionTAG(ACTION_RETURN, 0, 0);}
+void action_Modulo() {swf_AddActionTAG(ACTION_MODULO, 0, 0);}
+void action_NewObject() {swf_AddActionTAG(ACTION_NEWOBJECT, 0, 0);}
+void action_DefineLocal2() {swf_AddActionTAG(ACTION_DEFINELOCAL2, 0, 0);}
+void action_InitArray() {swf_AddActionTAG(ACTION_INITARRAY, 0, 0);}
+void action_Makehash() {swf_AddActionTAG(ACTION_MAKEHASH, 0, 0);}
+void action_TypeOf() {swf_AddActionTAG(ACTION_TYPEOF, 0, 0);}
+void action_TargetPath() {swf_AddActionTAG(ACTION_TARGETPATH, 0, 0);}
+void action_Enumerate() {swf_AddActionTAG(ACTION_ENUMERATE, 0, 0);}
+void action_Add2() {swf_AddActionTAG(ACTION_ADD2, 0, 0);}
+void action_Less2() {swf_AddActionTAG(ACTION_LESS2, 0, 0);}
+void action_Equals2() {swf_AddActionTAG(ACTION_EQUALS2, 0, 0);}
+void action_ToNumber() {swf_AddActionTAG(ACTION_TONUMBER, 0, 0);}
+void action_ToString() {swf_AddActionTAG(ACTION_TOSTRING, 0, 0);}
+void action_PushDuplicate() {swf_AddActionTAG(ACTION_PUSHDUPLICATE, 0, 0);}
+void action_StackSwap() {swf_AddActionTAG(ACTION_STACKSWAP, 0, 0);}
+void action_GetMember() {swf_AddActionTAG(ACTION_GETMEMBER, 0, 0);}
+void action_SetMember() {swf_AddActionTAG(ACTION_SETMEMBER, 0, 0);}
+void action_Increment() {swf_AddActionTAG(ACTION_INCREMENT, 0, 0);}
+void action_Decrement() {swf_AddActionTAG(ACTION_DECREMENT, 0, 0);}
+void action_CallMethod() {swf_AddActionTAG(ACTION_CALLMETHOD, 0, 0);}
+void action_NewMethod() {swf_AddActionTAG(ACTION_NEWMETHOD, 0, 0);}
+void action_BitAnd() {swf_AddActionTAG(ACTION_BITAND, 0, 0);}
+void action_BitOr() {swf_AddActionTAG(ACTION_BITOR, 0, 0);}
+void action_BitXor() {swf_AddActionTAG(ACTION_BITXOR, 0, 0);}
+void action_BitLShift() {swf_AddActionTAG(ACTION_BITLSHIFT, 0, 0);}
+void action_BitRShift() {swf_AddActionTAG(ACTION_BITRSHIFT, 0, 0);}
+void action_BitURShift() {swf_AddActionTAG(ACTION_BITURSHIFT, 0, 0);}
+void action_Call() {swf_AddActionTAG(ACTION_CALL, 0, 0);}
+void action_End() {swf_AddActionTAG(ACTION_END, 0, 0);}
+void action_GotoFrame(U16 frame)
+{
+ *(U16*)currentatag->tmp = SWAP16(frame);
+ swf_AddActionTAG(ACTION_GOTOFRAME, (U8*)currentatag->tmp, 2);
+}
+void action_Jump(U16 branch)
+{
+ *(U16*)currentatag->tmp = SWAP16(branch);
+ swf_AddActionTAG(ACTION_JUMP, (U8*)currentatag->tmp, 2);
+}
+void action_If(U16 branch)
+{
+ *(U16*)currentatag->tmp = SWAP16(branch);
+ swf_AddActionTAG(ACTION_IF, (U8*)currentatag->tmp, 2);
+}
+void action_StoreRegister(U8 reg)
+{
+ *(U8*)currentatag->tmp = reg;
+ swf_AddActionTAG(ACTION_STOREREGISTER, (U8*)currentatag->tmp, 1);
+}
+void action_GotoFrame2(U8 method)
+{
+ *(U8*)currentatag->tmp = method;
+ swf_AddActionTAG(ACTION_GOTOFRAME2, (U8*)currentatag->tmp, 1);
+}
+void action_GetUrl2(U8 method)
+{
+ *(U8*)currentatag->tmp = method;
+ swf_AddActionTAG(ACTION_GETURL2, (U8*)currentatag->tmp, 1);