Thanks for the info, Jason and Tim. I'm actually going to give up on this for now to move onto other things. But here's what I was REALLY wanting. When rolling over any part of the row, I wanted the whole row to zoom. I haven't been able to figure out how to do that because of the scoping issues. As it stands now, each cell is an island and can't communicate easily to the whole that it needs to zoom. It would be great if the datagrid itself had events for row rollovers and a way to apply an effect to the whole row.
On 6/19/06, Jason Szeto [EMAIL PROTECTED] wrote:
Pan,
You
are actually running into a scoping problem. You don't get an error
because your effectTriggers are using strings instead of effect instances. Try
changing rollOverEffect="zoomIn" to rollOverEffect="{zoomIn}".
You should get an error complaining that zoomIn doesn't exist.
The problem is that when you use inline
components, the component must be self-contained. It has no access to objects in
the parent app. If you move the two zoom effects into the VBox component, then
your effects will play. I've included an updated version. Notice that I
had to set the scrollPolicy of the VBox to prevent scrollbars from appearing
during the zoom.
?xml version=1.0
encoding=utf-8?
mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml
layout=absolute
mx:ArrayCollection
id=dataSet
mx:source
mx:Objectmx:MonthJanuary/mx:Monthmx:Costs20/mx:Costs/mx:Object
mx:Objectmx:MonthFebruary/mx:Monthmx:Costs60/mx:Costs/mx:Object
mx:Objectmx:MonthMarch/mx:Monthmx:Costs90/mx:Costs/mx:Object
/mx:source
/mx:ArrayCollection
mx:DataGrid id=grid
dataProvider={dataSet} width=100%
height=100%
mx:columns
mx:DataGridColumn
mx:itemRenderer
mx:Component
mx:VBox
verticalScrollPolicy=off horizontalScrollPolicy=off
mx:Zoom id=zoomIn zoomWidthTo=2
zoomHeightTo=2 /
mx:Zoom id=zoomOut zoomWidthTo=1
zoomHeightTo=1 /
mx:Text text=some text width=100%
rollOverEffect={zoomIn} rollOutEffect={zoomOut}/
/mx:VBox
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
mx:DataGridColumn dataField=Month/
mx:DataGridColumn dataField=Costs/
/mx:columns
/mx:DataGrid
/mx:Application
Jason
From:
flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com]
On Behalf Of Pan Troglodytes
Sent: Monday, June 19, 2006 1:07
PM
To: flexcoders
Subject: [flexcoders] adding zoom
effect to datagrid row
I'm
having a real time trying to get a rolloverEffect to work on a datagrid.
What I want is for the text to zoom a little bit when rolled over. Here's
my code:
?xml version=1.0
encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
layout=absolute
mx:ArrayCollection id=dataSet
mx:source
mx:Objectmx:MonthJanuary/mx:Monthmx:Costs20/mx:Costs/mx:Object
mx:Objectmx:MonthFebruary/mx:Monthmx:Costs60/mx:Costs/mx:Object
mx:Objectmx:MonthMarch/mx:Monthmx:Costs90/mx:Costs/mx:Object
/mx:source
/mx:ArrayCollection
mx:Zoom id=zoomIn zoomWidthTo=2
zoomHeightTo=2 /
mx:Zoom id=zoomOut zoomWidthTo=1
zoomHeightTo=1 /
mx:DataGrid id=grid dataProvider={dataSet}
width=100% height=100%
mx:columns
mx:DataGridColumn
mx:itemRenderer
mx:Component
mx:VBox
mx:Text
text=some text width=100%
rollOverEffect=zoomIn rollOutEffect=zoomOut/
/mx:VBox
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
mx:DataGridColumn dataField=Month/
mx:DataGridColumn dataField=Costs/
/mx:columns
/mx:DataGrid
/mx:Application
But the effect never happens. I've tried a lot of different variations
with no luck.
--
Jason
-- Jason
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development
Computer software development
Software design and development
Macromedia flex
Software development best practice
YAHOO! GROUPS LINKS
Visit your group "flexcoders" on the web.
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___