A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: maxscroll question

  1. #1
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356

    maxscroll question

    Hey-
    i have my dynamic text loaded into a text field, and i have created buttons to scroll the dynamic text field on press, both up and down..

    Now, how can i make my scroll buttons only appear if the loaded text is longer that what the dynamic text field can display at one time?

    i assume it will use the maxscroll property, but i'm not sure exactly how to do it..

    thanks,
    -myk

  2. #2
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    bump

  3. #3
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    bump

  4. #4
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    bump again?
    thanks,
    -myk


  5. #5
    Junior Member
    Join Date
    Dec 2003
    Posts
    18
    I have the same question too Myk, but I would like to complicate things further by asking this:

    How can I hide instances of a button, say called "up" AS WELL AS the scrollbar if the text is too long? Also, what would I need to do if I wanted to display an alternative movie clip if the buttons and scrollbar weren't on screen?

    Hope someone out there can help us!

  6. #6
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    i'm not using a scrollbar, because i couldnt figure out how to proportionantly (spelling?) scale mine and/or make its movement range proportional to the length of text. As for the buttons, i would this something like:
    code:

    if (textBox.maxscroll >= loadedText.maxscroll) {
    scrollButtons._visible = false;
    }



    of course, this script doesnt work, but that's the general idea. I just need to find out how to properly access the maxscroll property of the new text BEFORE it actually loadd into the text box..

    then again, maybe that will work... will have to givr it the old college try.

    -myk

  7. #7
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    ....

  8. #8
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    board's been real slow lately...

    Oldnewbie, are you lurking here somewhere? I still havent been able to figure this out.

    gSolo? eStudio? anybody?

    -myk

  9. #9
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    You cant access maxscroll before the text is in the text box... why would it matter before or after anyways...

    code:
    _txt.htmlText = "1<br>2<br>3<br>4<br>5";
    if (_txt.maxscroll > 1) {
    // you can scroll
    } else {
    // you can't scroll
    }


  10. #10
    -Iron Myk- mykrob's Avatar
    Join Date
    Dec 2001
    Location
    Jackson, TN
    Posts
    1,356
    THANK YOU!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center