[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash/testsuite/misc-ming.all goto_frame_test.c |
Date: |
Wed, 31 Jan 2007 08:14:53 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/01/31 08:14:53
Modified files:
testsuite/misc-ming.all: goto_frame_test.c
Log message:
add test for consecutive goto
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/goto_frame_test.c?cvsroot=gnash&r1=1.3&r2=1.4
Patches:
Index: goto_frame_test.c
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/goto_frame_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- goto_frame_test.c 29 Jan 2007 07:44:46 -0000 1.3
+++ goto_frame_test.c 31 Jan 2007 08:14:53 -0000 1.4
@@ -21,8 +21,6 @@
*
* Test for ActionGotoFrame
*
- * the root movie has 4 frames which contains another 3-framed movieClip named
mc_red.
- * At _root's 2st frame, tell mc_red to goto 3rd frame and stop.
*/
#include <stdlib.h>
@@ -67,25 +65,38 @@
SWFMovieClip_add(mc_red, (SWFBlock)sh_red);
SWFMovieClip_nextFrame(mc_red);//1st frame
SWFMovieClip_nextFrame(mc_red);//2st frame
- add_clip_actions(mc_red, "var flag = \"action_executed\"; ");
+ add_clip_actions(mc_red, "var flag = \"action_executed\"; \
+ var x = \"mc_red.frame3\";\
+ play();");
SWFMovieClip_nextFrame(mc_red);//3nd frame
+ add_clip_actions(mc_red, "x = \"mc_red.frame4\"; \
+ stop();");
+ SWFMovieClip_nextFrame(mc_red);//4th frame
+
SWFDisplayItem it_red;
it_red = SWFMovie_add(mo, (SWFBlock)mc_red);
SWFDisplayItem_setDepth(it_red, 3);
SWFDisplayItem_setName(it_red, "mc_red");
add_actions(mo, " check_equals(mc_red._currentframe, 1); \
mc_red.gotoAndStop(3); \
- check_equals(mc_red._currentframe, 3);");
-
+ check_equals(mc_red._currentframe, 3); \
+ _root.goAndStop(3); ");
SWFMovie_nextFrame(mo); //2nd frame
+ add_actions(mo, " _root.gotoAndStop(4); \
+ mc_red.x = \"_root.frame3\"; ");
SWFMovie_nextFrame(mo); //3nd frame
+ add_actions(mo, " _root.gotoAndStop(5); \
+ mc_red.x = \"_root.frame4\"; ");
+ SWFMovie_nextFrame(mo); //4nd frame
+
//checks
check_equals(mo, "_root.mc_red.flag", "'action_executed'");
+ check_equals(mo, "_root.mc_red.x", "'_root.frame4'");
add_actions(mo, " _root.totals(); stop(); ");
- SWFMovie_nextFrame(mo); //4th frame
+ SWFMovie_nextFrame(mo); //5th frame
//Output movie
puts("Saving " OUTPUT_FILENAME );