- tag = swf_InsertTag(tag,ST_DEFINEBUTTON);
- swf_SetU16(tag,buttonid); //id
- swf_ButtonSetFlags(tag, 0); //menu=no
- swf_ButtonSetRecord(tag,0x01,myshapeid,depth,0,0);
- swf_ButtonSetRecord(tag,0x02,myshapeid2,depth,0,0);
- swf_ButtonSetRecord(tag,0x04,myshapeid2,depth,0,0);
- swf_ButtonSetRecord(tag,0x08,myshapeid,depth,0,0);
- swf_SetU8(tag,0);
- swf_ActionSet(tag,actions);
- swf_SetU8(tag,0);
+ if(!mouseover)
+ {
+ tag = swf_InsertTag(tag,ST_DEFINEBUTTON);
+ swf_SetU16(tag,buttonid); //id
+ swf_ButtonSetFlags(tag, 0); //menu=no
+ swf_ButtonSetRecord(tag,0x01,myshapeid,depth,0,0);
+ swf_ButtonSetRecord(tag,0x02,myshapeid2,depth,0,0);
+ swf_ButtonSetRecord(tag,0x04,myshapeid2,depth,0,0);
+ swf_ButtonSetRecord(tag,0x08,myshapeid,depth,0,0);
+ swf_SetU8(tag,0);
+ swf_ActionSet(tag,actions1);
+ swf_SetU8(tag,0);
+ }
+ else
+ {
+ tag = swf_InsertTag(tag,ST_DEFINEBUTTON2);
+ swf_SetU16(tag,buttonid); //id
+ swf_ButtonSetFlags(tag, 0); //menu=no
+ swf_ButtonSetRecord(tag,0x01,myshapeid,depth,0,0);
+ swf_ButtonSetRecord(tag,0x02,myshapeid2,depth,0,0);
+ swf_ButtonSetRecord(tag,0x04,myshapeid2,depth,0,0);
+ swf_ButtonSetRecord(tag,0x08,myshapeid,depth,0,0);
+ swf_SetU8(tag,0); // end of button records
+ swf_ButtonSetCondition(tag, BC_IDLE_OVERUP);
+ swf_ActionSet(tag,actions1);
+ if(actions2) {
+ swf_ButtonSetCondition(tag, BC_OVERUP_IDLE);
+ swf_ActionSet(tag,actions2);
+ swf_SetU8(tag,0);
+ swf_ButtonPostProcess(tag, 2);
+ } else {
+ swf_SetU8(tag,0);
+ swf_ButtonPostProcess(tag, 1);
+ }
+ }