gnash-dev
[Top][All Lists]
Advanced

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

Re: [Gnash-dev] Testcase for gnash-embedded


From: strk
Subject: Re: [Gnash-dev] Testcase for gnash-embedded
Date: Mon, 6 Nov 2006 10:41:10 +0100

mmm.. the testcsae is surely good to add to our testsuite,
anyway, for the specific case we were talking about what 
I needed was to understand why a "rounded" number was *printed*
in the textfield.
If you round yourself that'd make no test for it.
The initial question was: how do you print the number into
the textfield ?
Do you assign _xscale to *it* (as a character reference) ?

--strk;

On Mon, Nov 06, 2006 at 09:00:42AM +0100, Udo Giacomozzi wrote:
> I open a new thread on this to keep discussion in one place.
> 
> I've attached the testcase you requested, strk. I hope it's what you
> expected.
> 
> ActionScript code for reference:
> 
> --- frame 1 ---
> 
> var container:MovieClip = createEmptyMovieClip("container", 
> getNextHighestDepth());
> var mcLoader:MovieClipLoader = new MovieClipLoader();
> mcLoader.addListener(this);
> mcLoader.loadClip("gravity.swf", container);
> 
> function onLoadInit(mc:MovieClip) {
>     trace("onLoadInit: " + mc);
>         
>         // just a quick test to see if Math.abs() works
>         if (Math.abs(-9) == 9) {
>                 trace("PASSED: Math.abs() works");
>         
>                 if (Math.abs(mc._xscale-100) < 1)
>                         trace("PASSED: _xscale starts with 100");
>                 else
>                         trace("FAILED: _xscale does not start with 100 
> ("+mc._xscale+")");
>                 
>                 if (Math.abs(mc._yscale-100) < 1)
>                         trace("PASSED: _yscale starts with 100");
>                 else
>                         trace("FAILED: _yscale does not start with 100 
> ("+mc._yscale+")");      
>                         
>                 var start_w = mc._width;
>                 var start_h = mc._height;
>                 
>                 size=50*1;  // *not* VAR!
>                 mc._xscale = size;
>                 mc._yscale = size;
>                 
>                 if (Math.abs(mc._xscale-50) < 1)
>                         trace("PASSED: _xscale successfully changed to 50");
>                 else
>                         trace("FAILED: _xscale did not change to 50 
> ("+mc._xscale+")");
>                 
>                 if (Math.abs(mc._yscale-50) < 1)
>                         trace("PASSED: _yscale successfully changed to 50");
>                 else
>                         trace("FAILED: _yscale successfully changed to 50 
> ("+mc._yscale+")");   
>                         
>                 if (Math.abs(mc._width - start_w/2) < 1) 
>                         trace("PASSED: _width changed correctly");
>                 else
>                         trace("FAILED: _width incorrect after scaling 
> ("+mc._width+")");
>                         
>                 if (Math.abs(mc._height - start_h/2) < 1) 
>                         trace("PASSED: _height changed correctly");
>                 else
>                         trace("FAILED: _height incorrect after scaling 
> ("+mc._height+")");
>                         
>         } else {
>                 trace("FAILED: Math.abs() not available or buggy");
>         }
>         
> }
> 
> 
> --- button "smaller" ---
> 
> on (release) {
>         size = (size*1)-2;
>         container._xscale = size;
>         container._yscale = size;
>         
>         if (Math.abs(container._xscale - size) < 1)
>                 trace("PASSED: _xscale changed successfully");
>         else
>                 trace("FAILED: _xscale incorrect after change");
>         
>         if (Math.abs(container._yscale - size) < 1)
>                 trace("PASSED: _yscale changed successfully");
>         else
>                 trace("FAILED: _yscale incorrect after change");
> }
> 
> 
> 
> --- button "larger" ---
> 
> on (release) {
>         size = (size*1)+2;
>         container._xscale = size;
>         container._yscale = size;
>                 
>         if (Math.abs(container._xscale - size) < 1)
>                 trace("PASSED: _xscale changed successfully");
>         else
>                 trace("FAILED: _xscale incorrect after change");
>         
>         if (Math.abs(container._yscale - size) < 1)
>                 trace("PASSED: _yscale changed successfully");
>         else
>                 trace("FAILED: _yscale incorrect after change");
>         
> }
> 
> 
> 
> 
> Udo

> _______________________________________________
> Gnash-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-dev


-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 





reply via email to

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