Hi Folks,
First i am create the empty view stack to the application
<mx:ViewStack id="Props" width="920" visible="true" bottom="10" height="134"
x="10">
</mx:ViewStack> *
and then i am reading the xml and create the canvas inside controls and then
i add the canvas to the Props viewstack
Props.addchild(prpcanvas); and also am using the
Props.addchildAt(prpcanvas);
but its work for the first time, and the next time will add the another
canvas its return an error
RangeError: Error #2006: The supplied index is out of bounds.
at flash.display::DisplayObjectContainer/getChildAt()
at
mx.core::Container/getChildAt()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2332]
at mx.core::Container/
http://www.adobe.com/2006/flex/mx/internal::getScrollableRect()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:4201]
at
mx.core::Container/createContentPaneAndScrollbarsIfNeeded()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:4161]
at
mx.core::Container/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2689]
at
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
at
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:675]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
at
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
at
mx.managers.dragClasses::DragProxy/mouseUpHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\dragClasses\DragProxy.as:500]
how can i rectify this problem.... How to create a viewstack
programmatically.
Please Reply me...
*
--
Thanks & Regards
Swaminathan. M