[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/action_...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/action_... |
Date: |
Thu, 06 Sep 2007 08:58:57 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/09/06 08:58:57
Modified files:
. : ChangeLog
testsuite/misc-ming.all: action_execution_order_test1.c
Log message:
* testsuite/misc-ming.all/action_execution_order_test1.c: Add
tests
showing that onClipLoad event can reference self and
characters placed
either before or after the character carrying that event.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4235&r2=1.4236
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/action_execution_order_test1.c?cvsroot=gnash&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4235
retrieving revision 1.4236
diff -u -b -r1.4235 -r1.4236
--- ChangeLog 6 Sep 2007 01:55:44 -0000 1.4235
+++ ChangeLog 6 Sep 2007 08:58:56 -0000 1.4236
@@ -1,3 +1,9 @@
+2007-09-06 Sandro Santilli <address@hidden>
+
+ * testsuite/misc-ming.all/action_execution_order_test1.c: Add tests
+ showing that onClipLoad event can reference self and characters
placed
+ either before or after the character carrying that event.
+
2007-09-06 Zou Lunkai <address@hidden>
* testsuite/misc-ming.all/action_execution_order_test3.c: Reorganize
and recomment
Index: testsuite/misc-ming.all/action_execution_order_test1.c
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-ming.all/action_execution_order_test1.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- testsuite/misc-ming.all/action_execution_order_test1.c 1 Jul 2007
10:54:48 -0000 1.2
+++ testsuite/misc-ming.all/action_execution_order_test1.c 6 Sep 2007
08:58:56 -0000 1.3
@@ -40,8 +40,9 @@
main(int argc, char** argv)
{
SWFMovie mo;
- SWFMovieClip mc_red, dejagnuclip;
- SWFShape sh_red;
+ SWFMovieClip mc_red, mc_blu, dejagnuclip;
+ SWFShape sh_red, sh_blu;
+ SWFDisplayItem it_red, it_blu;
const char *srcdir=".";
if ( argc>1 )
@@ -69,13 +70,51 @@
SWFMovieClip_add(mc_red, (SWFBlock)sh_red);
SWFMovieClip_nextFrame(mc_red);//1st frame
- /* add mc_red to _root and name it as "mc_red" */
- SWFDisplayItem it_red;
+ mc_blu = newSWFMovieClip();
+ sh_blu = make_fill_square (0, 300, 60, 60, 0, 0, 255, 0, 0, 255);
+ SWFMovieClip_add(mc_blu, (SWFBlock)sh_blu);
+ SWFMovieClip_nextFrame(mc_blu);//1st frame
+
+ /*
+ * Add mc_red to _root and name it as "mc_red"
+ * Have onClipLoad reference mc_blu (yet to be placed)
+ */
it_red = SWFMovie_add(mo, (SWFBlock)mc_red);
+ SWFDisplayItem_addAction(it_red,
+ compileSWFActionCode(
+ "_root.typeofMcBluFromMcRedLoad = typeof(_root.mc_blu);"
+ "_root.typeofMcRedFromMcRedLoad = typeof(_root.mc_red);"
+ ), SWFACTION_ONLOAD);
SWFDisplayItem_setDepth(it_red, 3);
SWFDisplayItem_setName(it_red, "mc_red");
+
+ /*
+ * Add mc_blu to _root and name it as "mc_blu"
+ * Have onClipLoad reference mc_red (placed before)
+ */
+ it_blu = SWFMovie_add(mo, (SWFBlock)mc_blu);
+ SWFDisplayItem_addAction(it_blu,
+ compileSWFActionCode(
+ "_root.typeofMcRedFromMcBluLoad = typeof(_root.mc_red);"
+ "_root.typeofMcBluFromMcBluLoad = typeof(_root.mc_blu);"
+ ), SWFACTION_ONLOAD);
+ SWFDisplayItem_setDepth(it_blu, 4);
+ SWFDisplayItem_setName(it_blu, "mc_blu");
+ SWFDisplayItem_moveTo(it_blu, 200, 0);
+
SWFMovie_nextFrame(mo); /* 2nd frame */
+ // onLoad handler for mc_red DO can see mc_blu (not yet placed)
+ check_equals(mo, "_root.typeofMcBluFromMcRedLoad", "'movieclip'");
+
+ // onLoad handler for mc_red DO can see itself
+ check_equals(mo, "_root.typeofMcRedFromMcRedLoad", "'movieclip'");
+
+ // onLoad handler for mc_blu DO can see mc_red (placed before)
+ check_equals(mo, "_root.typeofMcRedFromMcBluLoad", "'movieclip'");
+
+ // onLoad handler for mc_blu DO can see itself
+ check_equals(mo, "_root.typeofMcBluFromMcBluLoad", "'movieclip'");
add_actions(mo, " _root.totals(); stop(); ");
SWFMovie_nextFrame(mo); /* 3rd frame */