I can't reproduce this but I just tried a simple case. Can you share
some code highlighting the problem (and/or file a bug at
bugs.adobe.com)? 

Thanks,
deepa

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian
Sent: Monday, December 17, 2007 8:25 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] adding backgroundColor to Canvas retains images
after removeAllChildren()?

I've run into a strange behavior with a Canvas component. I'm using a
Canvas to do some basic GoogleMap-like functionality: I add images to
the canvas, it's got scrollbars because the added images sometimes
extend the size of the canvas beyond it's container size, and it's
draggable. There are times when I need to load a new set of images. In
those cases, I simple call removeAllChildren() and then start adding
my new images. 

It worked fine until I set the backgroundColor. Prior to this I had
not set the bgColor so I was just using the default. The strange
effect that has created is when I want to 'refresh' the canvas with a
new set of images (and call removeAllChildren()), it leaves behind the
images that are in the viewable portion of the canvas. If I drag the
canvas around so that the old images get clipped, then they get
'painted' over with the background color (which is simply black).

I've tried calling validateNow() in between the removeAllChildren()
and drawing my new set of images, but that didn't clear up the old
images either. I have no other properties or styles set on the canvas
component except for left/right/bottom/top.

Any ideas what's causing this?

Thanks



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



Reply via email to