try
http://butterfliesandbugs.wordpress.com/2008/04/02/creating-smooth-rollover-and-rollout-effects/

On 22 June 2011 17:50, ganaraj p r <[email protected]> wrote:

> Hi,
>
> I was fiddling with the basics of Effects in Flex and I created a simple
> piece of code.
>
>
> What I notice is that there is a jarring effect ( which is not something
> desired !!). I did see a few articles on autoreversing transition effects.
> But there is a problem in the single animation itself that I noticed when
> the mouse is in a particular location.
>
> This simple application creates a HBox with 3 Labels and applies effects on
> the labels. When the mouse is near the edge of the label ( or mostly in the
> center label ) the animation keeps repeating itself. Is there some fix for
> this? Do you guys see the same behaviour as me?
>
> Also pasting the source here for other people.
>
> <?xml version="1.0" encoding="utf-8"?>
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
>    xmlns:s="library://ns.adobe.com/flex/spark"
>    xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"
> minHeight="600" backgroundColor="#4F4F4F"
>     applicationComplete="application1_applicationCompleteHandler(event)">
> <fx:Script>
>  <![CDATA[
> import mx.events.FlexEvent;
>
> protected function
> application1_applicationCompleteHandler(event:FlexEvent):void
>  {
> // TODO Auto-generated method stub
> }
>  private function mouseOverHandler(event:MouseEvent):void
> {
>  /* if(ef.isPlaying)
> ef.end();
> ef.play([event.currentTarget]); */
>  }
>
>
> protected function mouseOutHandler(event:MouseEvent):void
>  {
> // TODO Auto-generated method stub
> /* if( ef.isPlaying)
>  ef.end();
> ef.play([event.currentTarget],true); */
> }
>
> ]]>
> </fx:Script>
> <fx:Declarations>
>  <!-- Place non-visual elements (e.g., services, value objects) here -->
>  <s:Parallel id="ef1" duration="1000" startDelay="100">
> <s:AnimateColor colorFrom="#BDB7B7" colorTo="#eeeeee" duration="1000" />
>  <s:Scale duration="1000" scaleXFrom="1" scaleXTo="2" scaleYFrom="1"
> scaleYTo="2" autoCenterTransform="true"/>
>  </s:Parallel>
> </fx:Declarations>
> <s:VGroup top="400" left="0" width="100%" height="100%"
> verticalAlign="middle" textAlign="center" horizontalAlign="left" gap="10"
> paddingLeft="10">
>  <s:Label x="14" y="417" text="Label" color="#BDB7B7" rollOverEffect="ef1"
> mouseOver="mouseOverHandler(event)" mouseOut="mouseOutHandler(event)"/>
>  <s:Label x="26" y="441" text="Label" color="#BDB7B7" rollOverEffect="ef2"
> mouseOver="mouseOverHandler(event)"  mouseOut="mouseOutHandler(event)"/>
>  <s:Label x="26" y="471" text="Label" color="#BDB7B7" rollOverEffect="ef3"
> mouseOver="mouseOverHandler(event)" mouseOut="mouseOutHandler(event)"/>
>  </s:VGroup>
>
> </s:Application>
>
>
> Would be a great help if someone could help me out in this case to get the
> best way to do it.
>
> --
> Regards,
> Ganaraj P R
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>



-- 

Hissam,
Flex Developer,
INDIA.
(m) +919860694301
If I CRY angels deserves to DIE.

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to