Re: [flexcoders] ArgumentError: Error #2004: One of the parameters is invalid@Graphics/drawRect

Tuesday, December 06, 2011

 

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 <loudjazz@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 spark.primitives::Rect/draw()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\primitives\Rect.as:463]
at spark.primitives.supportClasses::StrokedElement/updateDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\primitives\supportClasses\StrokedElement.as:143]
at spark.primitives.supportClasses::GraphicElement/http://www.adobe.com/2006/flex/mx/internal::doUpdateDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\primitives\supportClasses\GraphicElement.as:3958]
at spark.primitives.supportClasses::GraphicElement/validateDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\primitives\supportClasses\GraphicElement.as:3942]
at spark.components::Group/validateDisplayList()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\components\Group.as:1087]
at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:736]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:819]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()


__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

0 comments:

Post a Comment