2 Replies Latest reply on Apr 15, 2008 3:28 PM by Rothrock

    TextField.hscroll value wonky

    Rothrock Level 5
      I'm working in Flash 8 on Windows XP and publishing to Flash 7. I'm doing some stuff with text and using a dynamic TextField that has the fonts embedded and everything is working fine.

      I needed to control the hscroll of the field and set about trying to work with it. I wasn't getting the results I wanted so I started tracing out the actual values that were present. And I found that the values were huge. After thinking about it a bit I realized that the hscroll value was returned in twips (twentieth of a pixel) -- not the pixels that the help says. So if the the text field was scrolled over 50 pixels the hscroll was 1000.

      I tried several different fonts and changing publish settings and it continued to report the twips value. The testing environment is player 8.0.22 and my browser has 9.0.47 and they both seem to continue to work correctly.

      I guess I'm only worried that at some point or in a given player or platform that it will all break. Does anybody else have experience with this?
        • 1. Re: TextField.hscroll value wonky
          FlashTastic Level 1
          I'm running XP, Flash CS3 and tried to recreate your issue.

          I created a dynamic textfield (100x30) set to multiline-nowrap. Added 2x v2 component uiscrollbars and then traced the .hscroll property via
          the TextField.onScroller method. I used 8 capital M's at 24pt for my data.

          My value returns pixels.. I verified this by scrolling the width of one M and then measuring the screenshot photoshop.

          Are you tracing the hscroll property of the scrollbar or textfield? Are you using v2 components?

          Cheers,
          FlashTastic


          • 2. Re: TextField.hscroll value wonky
            Rothrock Level 5
            Thanks for checking that out for me.

            I'm using the hscroll of a simple old TextField. No components. No scrollers. And just one single line. I just checked it out and I think it is the embedding that is causing the problem.

            If I put a text input field on the stage with a instance name of myField and then this code:

            myField.onChanged=function(){
            trace(this.hscroll);
            }

            I get nice pixel values by default. But if I then select that instance on stage and embed fonts from the properties panel they are suddenly in twips.