|
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:Object><mx:Month>January</mx:Month><mx:Costs>20</mx:Costs></mx:Object>
<mx:Object><mx:Month>February</mx:Month><mx:Costs>60</mx:Costs></mx:Object>
<mx:Object><mx:Month>March</mx:Month><mx:Costs>90</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: 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: -- 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
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] adding zoom effect to datagrid row Jason Szeto
- [flexcoders] Re: adding zoom effect to datagrid row Tim Hoff
- Re: [flexcoders] adding zoom effect to datagrid row Pan Troglodytes

