gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash/testsuite/misc-ming.all event_handler_sco...


From: Zou Lunkai
Subject: [Gnash-commit] gnash/testsuite/misc-ming.all event_handler_sco...
Date: Mon, 23 Apr 2007 03:52:19 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Zou Lunkai <zoulunkai>  07/04/23 03:52:19

Modified files:
        testsuite/misc-ming.all: event_handler_scope_test.c 

Log message:
        minor clean up

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/event_handler_scope_test.c?cvsroot=gnash&r1=1.1&r2=1.2

Patches:
Index: event_handler_scope_test.c
===================================================================
RCS file: 
/sources/gnash/gnash/testsuite/misc-ming.all/event_handler_scope_test.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- event_handler_scope_test.c  23 Apr 2007 02:07:41 -0000      1.1
+++ event_handler_scope_test.c  23 Apr 2007 03:52:19 -0000      1.2
@@ -31,8 +31,8 @@
 main(int argc, char** argv)
 {
   SWFMovie mo;
-  SWFMovieClip  mc2, dejagnuclip;
-  SWFDisplayItem  it2;
+  SWFMovieClip  mc, dejagnuclip;
+  SWFDisplayItem  it;
   SWFShape  sh_red;
 
   const char *srcdir=".";
@@ -55,44 +55,44 @@
   SWFMovie_nextFrame(mo);  /* 1st frame */
 
   
-  mc2 = newSWFMovieClip();
+  mc = newSWFMovieClip();
   sh_red = make_fill_square (100, 200, 60, 60, 255, 0, 0, 255, 0, 0);
-  SWFMovieClip_add(mc2, (SWFBlock)sh_red);  
-  SWFMovieClip_nextFrame(mc2); //frame1
-  SWFMovieClip_nextFrame(mc2); //frame2
-  add_clip_actions(mc2, " if (scope_test == 1); scope_test = 2; stop();");
-  SWFMovieClip_nextFrame(mc2); //frame3
-
-  it2 = SWFMovie_add(mo, (SWFBlock)mc2); 
-  SWFDisplayItem_setDepth(it2, 20); 
-  SWFDisplayItem_setName(it2, "mc2"); 
+  SWFMovieClip_add(mc, (SWFBlock)sh_red);  
+  SWFMovieClip_nextFrame(mc); //frame1
+  SWFMovieClip_nextFrame(mc); //frame2
+  add_clip_actions(mc, " if (scope_test == 1); scope_test = 2; stop();");
+  SWFMovieClip_nextFrame(mc); //frame3
+
+  it = SWFMovie_add(mo, (SWFBlock)mc); 
+  SWFDisplayItem_setDepth(it, 20); 
+  SWFDisplayItem_setName(it, "mc"); 
   /* Define onClipEnterFrame */
-  SWFDisplayItem_addAction(it2,
+  SWFDisplayItem_addAction(it,
     compileSWFActionCode(" _root.note('onClipEnterFrame triggered'); "
                          " var scope_test = 1; "), // Define mc.scope_test
     SWFACTION_ENTERFRAME);  
   /* Define onEnterFrame */
-  add_actions(mo, " mc2.onEnterFrame = function () "
+  add_actions(mo, " mc.onEnterFrame = function () "
                   " { _root.note('user defined onEnterFrame called'); "
                   "   scope_test = 3; "          // Define _root.scope_test 
                   " var scope_test = 4; }; " );  // Define a local var
   
   check_equals(mo, "_root.scope_test", "undefined");
-  check_equals(mo, "_root.mc2.scope_test", "undefined");
+  check_equals(mo, "_root.mc.scope_test", "undefined");
   SWFMovie_nextFrame(mo); /* 2nd frame */
   
-  check_equals(mo, "_root.mc2.scope_test", "1");
+  check_equals(mo, "_root.mc.scope_test", "1");
   check_equals(mo, "_root.scope_test", "3");
   SWFMovie_nextFrame(mo); /* 3rd frame */
   
-  check_equals(mo, "_root.mc2.scope_test", "2");
+  check_equals(mo, "_root.mc.scope_test", "2");
   SWFMovie_nextFrame(mo); /* 4th frame */
   
   check_equals(mo, "_root.scope_test", "3");
   SWFMovie_nextFrame(mo); /* 5th frame */
   
-  SWFDisplayItem_remove(it2);
-  check_equals(mo, "_root.mc2.scope_test", "undefined");
+  SWFDisplayItem_remove(it);
+  check_equals(mo, "_root.mc.scope_test", "undefined");
   add_actions(mo, " _root.totals(); stop(); ");
   SWFMovie_nextFrame(mo); /* 6th frame */
   //Output movie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]