简体   繁体   中英

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.

Please Help me asap.

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM