6 Replies Latest reply on Aug 27, 2008 9:56 PM by COKFlex

    Scroll a Label text

    COKFlex
      Hi All,

      I am new to Flex development, So kindly excuse me if I sound anything silly.

      I placed a Label inside VBox, Also I have some text displaying in that Label All I wanted to know is whether that text displayed in the Label needs to scroll horizontally.

      Can anyone suggest any good idea?

      Thanks in advance
        • 1. Re: Scroll a Label text
          Level 7

          "COKFlex" <webforumsuser@macromedia.com> wrote in message
          news:g8e9hm$t2o$1@forums.macromedia.com...
          > Hi All,
          >
          > I am new to Flex development, So kindly excuse me if I sound anything
          > silly.
          >
          > I placed a Label inside VBox, Also I have some text displaying in that
          > Label
          > All I wanted to know is whether that text displayed in the Label needs to
          > scroll horizontally.

          I think Labels just truncate if you don't give them enough space.


          • 2. Re: Scroll a Label text
            COKFlex Level 1
            Hi
            Thanks for the reply. I am wondering how the truncating text will give me the scrolling effect? Could you please explain it a bit more?

            Thanks.
            • 3. Re: Scroll a Label text
              Level 7

              "COKFlex" <webforumsuser@macromedia.com> wrote in message
              news:g8g4sr$hfv$1@forums.macromedia.com...
              > Hi
              > Thanks for the reply. I am wondering how the truncating text will give me
              > the scrolling effect? Could you please explain it a bit more?

              I was answering you question about whether the text needs to scroll.
              Truncated text does not needs to scroll, since it is truncated. Why don't
              you back up, regroup, explain what it is that you're trying to do, what
              you've tried, and how the effect of what you've tried is different than what
              you want?


              • 4. Re: Scroll a Label text
                COKFlex Level 1
                Hi
                thanks for the reply once again. I applogise for the incorrect form of putting my requirement here.
                I need a html marquee kind of effect with the label. Actually I dont want the label text to scroll, instead I want the entire label to scroll from left to right on the bottom of the screen like the news flash in the tv channels.

                Now I have the Vbox at the bottom and a label placed inside that. Which has the time displayed and aligned to the right of the screen. Here I need the time to be keep on scrolling at the bottom of the screen.

                I tried to move the label by setting the left/right properties but the label remains in the same place.
                shown below is my Label code
                • 5. Re: Scroll a Label text
                  Nani.Raj
                  Hi try this

                  <?xml version="1.0" encoding="utf-8"?>
                  <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
                  layout="absolute" creationComplete="{moveEffect.play([myLabel])}">

                  <mx:Canvas id="contentCanvas" height="300" width="100%"
                  borderStyle="solid" horizontalScrollPolicy="off">
                  <mx:Label id="myLabel" text="Prakash....." />
                  </mx:Canvas>

                  <mx:Move id="moveEffect" xFrom="{contentCanvas.width}" xTo="{0-myLabel.width}"
                  duration="50000" repeatCount="0" repeatDelay="100" />
                  </mx:Application>
                  • 6. Re: Scroll a Label text
                    COKFlex Level 1
                    Hi Prakash,

                    Thanks for the solution. This is what exactly I am looking for.
                    Looking forward your help in future too.