flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DavidM <dmos...@gmail.com>
Subject Re: Best way to blink a Spark Datagrid cell
Date Thu, 08 Jan 2015 19:48:30 GMT
Thanks Evyatar, below is the code I'm going to use.

The problem of the 'moving GridItemRenderer' remains.

That is: the effect starts on one cell of the data grid, but if you scroll
the data grid such that that GridItemRenderer is recycled, then the effect
continues to play out on the same gridItemRenderer, which is not at a
different location on the grid, and contains different data.

It's less of a problem because the effect is less marked toward the end of
it's duration as the opacity slowly approaches normal.

I'm thinking that perhaps overriding 'prepare' or 'discard' might be one
other think to try, ie: to kill the animation at one of those stages.


<?xml version="1.0" encoding="utf-8"?>
<s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
					xmlns:s="library://ns.adobe.com/flex/spark"
					width="400"
					height="300">

	<fx:Declarations>

		<s:Animate id="fader"
				   duration="3000"
				   target="{rect1}">
			<s:SimpleMotionPath property="alpha"
								valueFrom="0.0"
								valueTo="1.0"/>
		</s:Animate>

	</fx:Declarations>

	<fx:Script>
		
	</fx:Script>

	<s:Group>

		<s:Rect id="rect1"
				top="0"
				bottom="0"
				left="0"
				right="0">
			<s:fill>
				<s:SolidColor id="bgColor"
							  color="0xcccccc"/>
			</s:fill>
		</s:Rect>

		<s:Label id="labelDisplay"
				 height="18"
				 width="75"
				 verticalAlign="bottom"
				 textAlign="right"/>

	</s:Group>

</s:GridItemRenderer>



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Best-way-to-blink-a-Spark-Datagrid-cell-tp9334p9360.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message