gnash-commit
[Top][All Lists]
Advanced

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

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


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Drawing...
Date: Fri, 04 May 2007 09:22:51 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/05/04 09:22:51

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: DrawingApiTest.as 

Log message:
                * testsuite/misc-ming.all/DrawingApiTest.as: reintroduced
                  visual hitTest checks (not automated yet). This time
                  they don't break the exising test.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3086&r2=1.3087
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTest.as?cvsroot=gnash&r1=1.12&r2=1.13

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3086
retrieving revision 1.3087
diff -u -b -r1.3086 -r1.3087
--- ChangeLog   4 May 2007 08:35:01 -0000       1.3086
+++ ChangeLog   4 May 2007 09:22:51 -0000       1.3087
@@ -1,5 +1,8 @@
 2007-05-03 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-ming.all/DrawingApiTest.as: reintroduced
+         visual hitTest checks (not automated yet). This time
+         they don't break the exising test.
        * testsuite/MovieTester.{cpp,h}: add redraw() method,
          by default only force a redraw on *first* advance.
 

Index: testsuite/misc-ming.all/DrawingApiTest.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTest.as,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- testsuite/misc-ming.all/DrawingApiTest.as   29 Apr 2007 16:33:38 -0000      
1.12
+++ testsuite/misc-ming.all/DrawingApiTest.as   4 May 2007 09:22:51 -0000       
1.13
@@ -157,40 +157,99 @@
        }
 };
 
-#if 0
-createEmptyMovieClip("cursor", 3);
+createEmptyMovieClip("hitdetector", 3);
+hitdetector.createEmptyMovieClip("shapeshape", 1);
+with(hitdetector.shapeshape)
+{
+       lineStyle(2, 0x000000);
+       beginFill(0xFFFF00, 100);
+       drawCircle(hitdetector.shapeshape, 0, 0, 20);
+       endFill();
+}
+
+hitdetector.createEmptyMovieClip("bboxpoint", 2);
+with(hitdetector.bboxpoint)
+{
+       lineStyle(2, 0x000000);
+       beginFill(0xFFFF00, 100);
+       drawCircle(hitdetector.bboxpoint, 0, 0, 20);
+       endFill();
+       _x = 60;
+}
+
+hitdetector.createEmptyMovieClip("shapepoint", 3);
+with(hitdetector.shapepoint)
+{
+       lineStyle(2, 0x000000);
+       beginFill(0xFFFF00, 100);
+       drawCircle(hitdetector.shapepoint, 0, 0, 20);
+       endFill();
+       _x = 120;
+}
+
+hitdetector._y = 350;
+
+
+createEmptyMovieClip("cursor", 12);
 with(cursor)
 {
-       lineStyle(2, 0xFF0000);
+       lineStyle(2, 0x000000);
        beginFill(0xFF0000, 100);
        drawCircle(_root.cursor, 0, 0, 10);
-       onMouseMove = function()
+       endFill();
+       onEnterFrame = function()
+       {
+               hd = _root.hitdetector;
+
+#if 0 // don't move the controls for now...
+               with(hd)
        {
+                       if ( typeof(xshift) == 'undefined' )
+                       {
+                               xshift = 1;
+                       }
+                       else if ( xshift > 0 && _x >= 300 )
+                       {
+                               xshift = -1;
+                       }
+                       else if ( xshift < 0 && _x == 0 )
+                       {
+                               xshift = 1;
+                       }
+
+                       _x += xshift;
+               }
+#endif
+
+
                _x = _root._xmouse;
                _y = _root._ymouse;
 
                // Bounding box check
                if ( hitTest(_root.a) ) {
-                       _alpha=50;
+                       hd.shapeshape._xscale=150;
+                       hd.shapeshape._yscale=150;
                } else {
-                       _alpha=100;
+                       hd.shapeshape._xscale=100;
+                       hd.shapeshape._yscale=100;
                }
 
                // Bounding box check with circle center
                if ( _root.a.hitTest(_x, _y) ) {
-                       _root.a._alpha=50;
+                       hd.bboxpoint._xscale=150;
+                       hd.bboxpoint._yscale=150;
                } else {
-                       _root.a._alpha=100;
+                       hd.bboxpoint._xscale=100;
+                       hd.bboxpoint._yscale=100;
                }
 
                // Shape check with circle center
                if ( _root.a.hitTest(_x, _y, true) ) {
-                       _xscale=50;
-                       _yscale=50;
+                       hd.shapepoint._xscale=150;
+                       hd.shapepoint._yscale=150;
                } else {
-                       _xscale=100;
-                       _yscale=100;
+                       hd.shapepoint._xscale=100;
+                       hd.shapepoint._yscale=100;
                }
        };
 }
-#endif




reply via email to

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