Even if visible=false, the component will be layed out.  If both canvases have 
width/height=100% they will overlap

Declaration order sets "depth"

Instead of a Canvas, you might need to use UIComponent.  Canvas has code that 
blocks mouse events if you listen for any mouse events on it.  UIComponent is 
lower-level.  In Flash there is a difference between a transparent pixel and  
an area in a Sprite that hasn't been drawn on at all.  So, instead of a 
transparent background, you don't want a background at all, just draw the hit 
targets.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of pauli159000
Sent: Tuesday, October 20, 2009 12:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] transparent overlay with mouseover events passed throught 
- how to??



I'm using a chart component, and I want to implement a drill down that will 
overlay the summary chart. I'm an experienced developer, but new to 
Flex/ActionScript. I'm using the Axiis Datavis Library, although I don't think 
it matters for my questions.

I currently have an application with this structure:

ApplicationWindow
--ApplicationControlBar
--Canvas
--ControlBar

If I add a DrillDown Canvas with a transparent background and visual status set 
to false, I can update the dataprovider to the appropriate filtered detail and 
make it visible in the itemClick handler of the main chart Canvas. And I can 
make it invisible again in the itemClick handler of the drill down canvas. I'm 
thinking like this:

ApplicationWindow
--ApplicationControlBar
--Canvas itemClick="displayDrillDown();"
--DrillDownCanvas visible="false" backgroundAlpha="0" 
itemClick="removeDrillDown();"
--ControlBar

But what I'm not sure about, and haven't found any clear tutorial for, is:

* how to ensure that the drilldown canvas size and screen position will be 
identical to the main canvas, given potential application window resizing that 
the user may have done while it's visible status is false?

* how to ensure that the drilldown canvas is on top of the main canvas, so that 
it can intercept click events before they hit the main canvas? Is it defined by 
the declaration order in the MXML code?

* how to allow mouseover events to pass through, if there is no chart element 
on the drilldown canvas, so that tooltips will display for chart items on 
either canvas -- or even if this is possible?

I appreciate any assistance you can provide, even if it's to tell me that my 
approach is all wrong!

Reply via email to