Where are you making your calls to the drawing API? It should be in
updateDisplayList(), but that would require subclassing. If you don't
want to subclass you could probably hook up a listener to
networkBrowser's updateComplete event and clear and then redraw the
graphics in the handler.

HTH,
Ben



--- In flexcoders@yahoogroups.com, "Merrill, Jason"
<[EMAIL PROTECTED]> wrote:
>
> 
> Subject sums it up, but to clarify, I'm using the draw API in AS#
> (Sprite.graphics methods) to draw dynamically draw objects in sprites
> inside a panel holding a UIComponent:
> 
>       i.e. networkBrowser.graphics.drawCircle(100, 100, 50);
> 
> and then in MXML:
> 
>       <mx:Panel id="networkBrowserPanel" width="100%" height="100%"
> layout="absolute" title="Network" >
>               <mx:VBox horizontalAlign="left">
>                       <mx:UIComponent id="networkBrowser" />
>               </mx:VBox>
>       </mx:Panel>
> 
> it works great.  However, since the panel's width is intentionally 100%
> and height 100% so that when the browser window is resized, the panel
> resizes accordingly, the problem I have found with using the draw
> methods is that the objects that are drawn don't act like children of
> the Panel or Vbox components.  For example, when you resize the browser
> and the panel re-sizes, the drawn graphics do not move- in fact, if you
> resize the panel enough, the graphics can appear OUTSIDE the panel.
> Also, naturally  I would like the graphics to be masked by the panel's
> canvas, so that if the graphics are scaled up, they don't appear outside
> the Panel, and if there is a lot of graphics drawn which extend outside
> of the Panel's canvas, scrollbars will automatically appear.  
> 
> I can post an image if that helps to show the problem. Thanks for any
> help, I'm sure this has been covered before, but I couldn't locate it in
> the archives.
> 
> Jason Merrill
> Bank of America  
> GT&O L&LD Solutions Design & Development 
> eTools & Multimedia 
> 
> Bank of America Flash Platform Developer Community
>


Reply via email to