(or - another possible subject line - 'What is the quickest, least
processor intensive way of 'putting' 'squares' on a component?')

In the end I'm finding that createChild(VBox, ...) is just too
intensive. It takes too long. I'm looking for a better way... a
drawing API-ish way might be what I want...

I'd like to be able to populate a canvas with a score (100-200) of
filled rectangles at some point _after_ the application is up and
running... but when I reference the canvas and use the method fillRect
it doesn't work (ie. I can't see any change at all - and yes, the fill
color is different from the background color of the canvas where the
items are being created).

A lot of the examples that I've seen run drawing methods during the
init handler of the component - I need to be able to draw and erase
the 'stage' of the component after it's been instantiated...

Any ideas? I've tried calling draw and redraw right after the call to
fillRect, but those don't seem to work either.

I'm thinking of something like (this isn't the actual code):

<mx:Application...

<mx:Script>
<![CDATA[
   function drawRect(event){
      display.fillRect(0,0,100,100,0xFF0000,100);
   }
]]>
</mx:Script>

<mx:Canvas id="display"...

<mx:Button click="drawRect" />

</mx:Application>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to