[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte...
From: |
Zou Lunkai |
Subject: |
[Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte... |
Date: |
Fri, 07 Dec 2007 03:21:44 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Zou Lunkai <zoulunkai> 07/12/07 03:21:44
Modified files:
testsuite/misc-swfc.all: gotoFrameFromInterval.sc
Log message:
test calling gotoFrame inside a interval function, based on UdoG's
description. It's a sane test now, and stops at the last frame after finish
testing.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfc.all/gotoFrameFromInterval.sc?cvsroot=gnash&r1=1.5&r2=1.6
Patches:
Index: gotoFrameFromInterval.sc
===================================================================
RCS file:
/sources/gnash/gnash/testsuite/misc-swfc.all/gotoFrameFromInterval.sc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- gotoFrameFromInterval.sc 6 Dec 2007 15:41:30 -0000 1.5
+++ gotoFrameFromInterval.sc 7 Dec 2007 03:21:44 -0000 1.6
@@ -1,69 +1,61 @@
-.flash bbox=200x200 filename="gotoandplay_stop.swf" version=6 fps=10
+.flash bbox=800x600 filename="gotoFrameFromInterval.swf" version=6 fps=10
.frame 1
.action:
#include "Dejagnu.sc"
+ asOrder = '0+';
.end
.frame 2
.action:
- _root.jumped = false;
- _root.done = false;
-
stop();
- note("starting! ($Id: gotoFrameFromInterval.sc,v 1.5 2007/12/06 15:41:30
udog Exp $)");
-
- function doit() {
- note("now jumping...");
- gotoAndPlay(5);
- }
+ function local_whatever() {}
- // test:
- setInterval(
+ intervalID = setInterval(
function() {
- if (!_root.jumped && (getTimer() > 1000)) {
- _root.jumped = true;
- doit();
- }
-
- if (!_root.done && (getTimer() > 2000)) {
- _root.done = true;
-
- check_equals(_root._currentframe, 5);
- note("test activated in frame "+_root._currentframe);
-
- //Dejagnu.done();
-
- // BUG NOTICE: jumping to frame 10 makes Gnash restart the movie
- // even with the -1 switch!
- gotoAndPlay(9);
- }
-
+ if (_currentframe != 2) return;
+ gotoAndStop(6);
}
- , 100);
-
-
-
+ ,1000);
.end
-.frame 5
+.frame 6
+ .sprite mc1 // Define a sprite mc1
.action:
- stop();
- note("frame 5 reached (good)");
+ _parent.init_me(this);
+ .end
.end
-.frame 8
.action:
stop();
- note("frame 6 reached (bad)");
+ clearInterval( intervalID );
+
+ function init_me(obj) {
+ // traces here are just for visual check, can be safely removed.
+ // Please don't use _root.note() here, we don't need extra
function calls.
+ trace(obj);
+ trace(obj+" --> 1 =");
+ _root.asOrder += '1+';
+ trace(obj+" --> 2 ==");
+ _root.asOrder += '2+';
+ local_whatever();
+ trace(obj+" --> 3 ===");
+ _root.asOrder += '3+';
+ local_whatever();
+ trace(obj+" --> 4 ====");
+ _root.asOrder += '4+';
+ }
.end
- .stop
-.frame 10
+ .put clip1=mc1 // place a named sprite clip1
+ .put clip2=mc1 // place a named sprite clip2
+ .put clip3=mc1 // place a named sprite clip3
+
.action:
- note("goodbye");
+ xcheck_equals(asOrder, '0+1+2+3+4+1+2+3+4+1+2+3+4+');
totals(1);
.end
-.end
+
+.end // end of file
- [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Udo Giacomozzi, 2007/12/06
- [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Udo Giacomozzi, 2007/12/06
- [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Udo Giacomozzi, 2007/12/06
- Re: [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., strk, 2007/12/06
- Re[2]: [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Udo Giacomozzi, 2007/12/06
- Re: [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., strk, 2007/12/06
- Re[2]: [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Udo Giacomozzi, 2007/12/06
- Re: [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., strk, 2007/12/06
- Re[2]: [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Udo Giacomozzi, 2007/12/06
- Re: [Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., strk, 2007/12/06
[Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte...,
Zou Lunkai <=
[Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Zou Lunkai, 2007/12/07
[Gnash-commit] gnash/testsuite/misc-swfc.all gotoFrameFromInte..., Zou Lunkai, 2007/12/18