Ok thanks, that helps. I will look into it.

To: flexcoders@yahoogroups.com
From: aha...@adobe.com
Date: Tue, 6 Dec 2011 11:21:55 -0800
Subject: Re: [flexcoders] ArgumentError: Error #2004: One of the parameters is 




This error occurs when a components gets drawn at a really small size and its 
constraints compute out to be invalid.  For example, if you have:

    <s:Rect left=”2” right=”2” />

Once the component containing this rect is only 3 pixels wide, the width will 
be computed as –1 since the left side will be at 2 and right side at 1 and 
(right – left) = -1.

We don’t check for these conditions for performance reasons, and try to get the 
minWidths to defend against it.

In the debugger, you should be able to double-click on the draw() in the stack 
trace then examine properties to determine which rect it is.

On 12/6/11 9:36 AM, "Csomák Gábor" <csom...@gmail.com> wrote:





yes, but you trigger it, because the drawing and other visual functions are not 
called instantly, but on every timer tick, and the timer's speed is 24 
ticks/sec by default. so at every tick spark askes every component if the 
visuals have changed, and if so, calls the redraw, and thats where it goes back 
to your code.. 

On Tue, Dec 6, 2011 at 6:30 PM, Philip Smith <loudj...@hotmail.com> wrote:





>> it depends on your code. 

The error is happening in the Spark code...

To: flexcoders@yahoogroups.com

From: csom...@gmail.com

Date: Tue, 6 Dec 2011 09:24:20 +0100

Subject: Re: [flexcoders] ArgumentError: Error #2004: One of the parameters is 





it depends on your code. 

error finding method: comment half of the block. If its still the same error, 
the mistake will be in the other half. if it stopped the error, the error is in 
the commented half. repeat for the half with the error. repeat until you found 
the problem..

the error is because: if you draw something, change a label, etc.. so anything 
with a visual change, it won't change immediately, but every 1/24 second (by 
default) there is a timer event in Flex to apply that changes. So this error 
comes when the program refreshes its view. (you know because of the last row of 
the error:   at flash.utils::Timer/tick(), and goes to flex sdk, not your 
code..) you get very similar error, when you want to addChild() to an Element 
for example..

hope I helped.. 

On Tue, Dec 6, 2011 at 2:24 AM, method_air <loudj...@hotmail.com> wrote:




   This error started appearing, (the stack trace only has information relating 
to flex sdk classes), anyone know how to fix it:

ArgumentError: Error #2004: One of the parameters is invalid.

at flash.display::Graphics/drawRect()









at flash.utils::Timer/_timerDispatch()

at flash.utils::Timer/tick()













Alex Harui

Flex SDK Team

Adobe System, Inc.





Reply via email to