diff options
author | kramm <kramm> | 2002-05-30 17:58:20 +0000 |
---|---|---|
committer | kramm <kramm> | 2002-05-30 17:58:20 +0000 |
commit | 1f237fb411319057ae1e4f779e511cea0e206858 (patch) | |
tree | d120994cd19a6dc29525fe6caec0e2c06ff9abd6 /swfs | |
parent | 0138bdb91fabf3bcda3c8f04a3ee5554f916a22b (diff) |
made rfxswf actionscript routines threadsafe. ;)
Diffstat (limited to 'swfs')
-rw-r--r-- | swfs/PreLoaderTemplate.c | 26 | ||||
-rw-r--r-- | swfs/simple_viewer.c | 40 |
2 files changed, 28 insertions, 38 deletions
diff --git a/swfs/PreLoaderTemplate.c b/swfs/PreLoaderTemplate.c index 294a99a8..1f25f5e2 100644 --- a/swfs/PreLoaderTemplate.c +++ b/swfs/PreLoaderTemplate.c @@ -53,21 +53,17 @@ int main (int argc,char ** argv) tag = swf_InsertTag(tag,ST_SHOWFRAME); - a1 = swf_ActionStart(tag); - action_PushFloat(12.0); - action_PushString(""); - action_GetProperty(); - action_PushFloat(2.0); - action_Less(); - action_If(2); - action_GotoFrame(1); - action_End(); - swf_ActionEnd(); - - a2 = swf_ActionStart(tag); - action_Stop(); - action_End(); - swf_ActionEnd(); + a1 = action_PushFloat(0, 12.0); + a1 = action_PushString(a1, ""); + a1 = action_GetProperty(a1); + a1 = action_PushFloat(a1, 2.0); + a1 = action_Less(a1); + a1 = action_If(a1, 2); + a1 = action_GotoFrame(a1, 1); + a1 = action_End(a1); + + a2 = action_Stop(0); + a2 = action_End(a2); tag = swf_InsertTag(tag,ST_DOACTION); swf_ActionSet(tag, a1); diff --git a/swfs/simple_viewer.c b/swfs/simple_viewer.c index b9055338..93d6b5fe 100644 --- a/swfs/simple_viewer.c +++ b/swfs/simple_viewer.c @@ -117,31 +117,25 @@ int main (int argc,char ** argv) swf_ShapeFree(s); // clean shape structure (which isn't needed anymore after writing the tag) } - a1 = swf_ActionStart(tag); - action_SetTarget("viewport"); - action_PreviousFrame(); - action_SetTarget(""); - action_End(); - swf_ActionEnd(); - - a2 = swf_ActionStart(tag); - action_SetTarget("viewport"); - action_NextFrame(); - action_SetTarget(""); - action_End(); - swf_ActionEnd(); - - a3 = swf_ActionStart(tag); - action_SetTarget("viewport"); - action_Stop(); - action_SetTarget(""); + a1 = action_SetTarget(0, "viewport"); + a1 = action_PreviousFrame(a1); + a1 = action_SetTarget(a1, ""); + a1 = action_End(a1); + + a2 = action_SetTarget(0, "viewport"); + a2 = action_NextFrame(a2); + a2 = action_SetTarget(a2,""); + a2 = action_End(a2); + + a3 = action_SetTarget(0,"viewport"); + a3 = action_Stop(a3); + a3 = action_SetTarget(a3,""); #ifdef SUBTITLES - action_PushString("/:subtitle"); - action_PushString(""); //reset variable - action_SetVariable(); + a3 = action_PushString(a3,"/:subtitle"); + a3 = action_PushString(a3,""); //reset variable + a3 = action_SetVariable(a3); #endif - action_End(); - swf_ActionEnd(); + a3 = action_End(a3); for(t=0;t<2;t++) { |