I may file a bug tonight. I registered with my gmail address, which is
blocked at work so I can't complete the registration.

I'd love to share code that highlights the problem, but am not sure
what to share. It is literally as simple as

removeAllChildren();
drawMap();

This is within my component which extends Canvas. The drawMap()
function draws the new images, as determined by the data model. Those
2 lines of code are executed from 3 different events. It was working
for 2 of them, and sporadically for the 3rd. Now it appears to be
working more consistently on the one it wasn't working before. I have
no idea what changed.

If I uncover more information, I'll post it.  Thanks for your reply

Brian

--- In [email protected], "Deepa Subramaniam" <[EMAIL PROTECTED]>
wrote:
>
> 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: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Brian
> Sent: Monday, December 17, 2007 8:25 AM
> To: [email protected]
> 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