I'm sure its something stupid, but I cant figure out why this doesnt draw 
anything.

I followed the example found here: 
http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001738.html


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
<mx:Canvas height="75" width="100">
                <mx:Script>
                        <![CDATA[
                                protected override function 
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
                                    super.updateDisplayList(unscaledWidth, 
unscaledHeight);                                 
                                    graphics.clear();
                                    
                                graphics.beginFill(0xD3D3D3);
                                        //graphics.drawRect(0, 
unscaledHeight/3, unscaledWidth, 2 * unscaledHeight/3);
                                        graphics.drawRect(0, 0, 
unscaledWidth,unscaledHeight);
                                        graphics.endFill();     
                                        
                                        graphics.moveTo(0, 15);
                                    graphics.lineStyle(1, 0xFF0000);
                                    graphics.lineTo(50, 15);
                                }
                        ]]>
                </mx:Script>
        </mx:Canvas>    
</mx:Application>


Reply via email to