Not sure why, but I always use a nested canvas; one for the bgcolor and one for graphics and other elements. - Chris Morrow
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> <mx:Script> public function init():void { drawing_canvas.graphics.lineStyle(3,0xffffff, 1.0); drawing_canvas.graphics.moveTo(10,10); drawing_canvas.graphics.lineTo(100,100); } </mx:Script> <mx:Canvas width="100%" height="100%" backgroundColor="0x000000"> <mx:Canvas id="drawing_canvas" /> </mx:Canvas> </mx:Application> On Tue, Nov 16, 2010 at 9:29 AM, Atlanta Geek <[email protected]> wrote: > I have the following code and the line is not visible. If I remove > the background color from the canvas the line is visible. > Would anyone know why this is happening? I am on Flex 3.5 > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute" creationComplete="init()"> > <mx:Script> > public function init():void > { > drawing_canvas.graphics.lineStyle(3,0xffffff, 1.0); > drawing_canvas.graphics.moveTo(10,10); > drawing_canvas.graphics.lineTo(100,100); > } > </mx:Script> > > <mx:Canvas id="drawing_canvas" width="100%" height="100%" > backgroundColor="0x000000" /> > </mx:Application> > > > ------------------------------------------------------------- > To unsubscribe from this list, simply email the list with unsubscribe in > the subject line > > For more info, see http://www.affug.com > Archive @ http://www.mail-archive.com/discussion%40affug.com/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- > > >
