Sagar Rawal
Sagar Rawal

Reputation: 1442

vertical marquee effect in FLEX

I want to show the TEXT with the marquee effect in my application.

Marquee effect is only on the text that is in the BOX and that should be in the Vertical.

Upvotes: 0

Views: 1133

Answers (1)

Erick Martinez
Erick Martinez

Reputation: 293

This code works fine for me.

    <fx:Script>
    <![CDATA[
        import mx.collections.ArrayCollection;
        import mx.effects.Move;

        import spark.events.IndexChangeEvent;

        // Define a new Zoom effect.
        private var zMove:Move = new Move();

        private function toLeft():void {
            // Set duration of zoom effect. 
            zMove.duration = 20000;
            zMove.xFrom = 0.1 ;
            zMove.xTo = -label2.width;
            zMove.target = label2;
        }

        private function rightToLeft():void {
            // Set duration of zoom effect. 
            zMove.duration = 20000;
            zMove.xFrom = Capabilities.screenResolutionX;
            zMove.xTo = 0.1;
            zMove.target = label2;
        }

        private function zoomeffect():void {
            if(zMove.xFrom != 0.1) {
                toLeft();
            } else {
                rightToLeft();
            }
            label2.visible=true;
            zMove.play([label2],false);
        }

    ]]>
     </fx:Script>

          <s:Group width="100%" bottom="0" height="50" contentBackgroundColor="#d0382b" >
         <s:Label id="label2" text="Marquee effect in flex "
              top="25" height="50" fontSize="15" fontStyle="italic" 
              fontFamily="Verdana" verticalCenter="0" visible="false"
              creationComplete="moveffect()" effectEnd="moveffect()"/>
      </s:Group>

Upvotes: 1

Related Questions