2 Replies Latest reply on Jul 17, 2008 1:45 PM by ArneOb

    Pan/Zoom component errors w/ Flex 3

    David Repas Level 1
      I'm getting an error in Flex 3 (not Flex 2 SDK) when using the Adobe FIG Pan/Zoom component.
      http://www.adobe.com/devnet/flex/samples/fig_panzoom/

      The error is as follows:
      ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
      at flash.display::DisplayObjectContainer/removeChild()
      at mx.core::UIComponent/ http://www.adobe.com/2006/flex/mx/internal::$removeChild()[E:\dev\3.0.x\frameworks\project s\framework\src\mx\core\UIComponent.as:4995
      at mx.core::UIComponent/removeChild()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core \UIComponent.as:4903]
      at com.adobe.wheelerstreet.fig.panzoom::ImageViewer/handleLoadComplete()[C:\ColdFusion8\wwwr oot\CFIDE\samples\FinagleB\src\com\adobe\wheelerstreet\fig\panzoom\ImageViewer.as:482]



      Any thoughts? Thanks.
        • 1. Re: Pan/Zoom component errors w/ Flex 3
          John Hall Level 4
          Any luck? Same problem here.
          • 2. Re: Pan/Zoom component errors w/ Flex 3
            ArneOb
            Well I was able to fix it, but I still don´t know, what went wrong there.

            1.: give _progressSWF a name of "_progressSWF" before it is added as a child (line:465).
            2.: give _percentLoadedLabel a name of "_percentLoadedLabel" before it is added as a child (line:475).
            3.:Get them both by the name (line:487 appr.).:
            /**CODE
            var myProgress:DisplayObject=getChildByName("_progressSWF")
            removeChild(myProgress);
            myProgress=getChildByName("_percentLoadedLabel")
            removeChild(myProgress);
            */
            The errors disappear, with me not knowing why (and I don´t care for the moment.
            Have Fun
            _____
            Arne