Welcome, Guest
  • Author Topic: ScrollPane Pain  (Read 1564 times)

    Yan

    • Server what's that
    • *
    • Posts: 4
      • View Profile
    ScrollPane Pain
    « on: 08/27/02, 10:52 »
    Hi everyone,

    I am new here and this is the first time I post as the scrollpane is killing me.

    I have a simple fla. In the library I have a clip called myMovie. This clip consists of a Input box with four lines of text already typed in. Then there is the scrollpane component.

    I dragged the scrollpane to the main stage and named it myScrollBar. In the Parameters page I entered myMovie as the Scroll Content Identifier, and auto for Vscroll and Hscroll. Drag is false. I put action script code in the first frame.

    Two problems:
    1) The scroll bars don't show up if I don't set them to true in here, even though there are more rows hidden (e.g. the fourth line don't show but the scroll bars were not there. I can move the arrow keys to go up and down)
    var content = myScrollBar.getScrollContent();
    myScrollBar.setSize(content._width,content._height);  
    myScrollBar.refreshPane;
    stop();

    2) If I set them like the following then I see the scroll bars but I still can't scroll to the last row eventhough it is there (as you can use the arrow keys to move down.
    var content = myScrollBar.getScrollContent();
    myScrollBar.setSize(content._width+10,content._height+10);  
    myScrollBar.setVScroll(true);
    myScrollBar.setHScroll(true);
    myScrollBar.refreshPane;
    stop();

    Yes I could use the scroll bar instead of the scroll pane. But I want to see how the scroll pane would work on a simple text box.

    Anyone can help? Thanks so much in advance!

    Yan

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:ScrollPane Pain
    « Reply #1 on: 08/27/02, 11:19 »
    Yes that is a strange Problem.  I actually just tried it and got the same results as you where mentioning.

    I have noticed this a bit in the past as well though.

    One thing you can try (which will force the scrollpane to scroll for the entire contents of the text in "myMovie"),  Is drawing a small verticle Line that matches the Height of the text inside of myMovie.  This will force the scrollpane to show the entire contents.

    I'm not sure why this is the case - but it seems like the Scrollbar component has some problems with static text when used in this manner.

    A better solution might be to make your Textfield in your "myMovie" clip - into a Dynamic Text Field (give a little space after the last line) - And MAKE sure to embed the Font Outline (Character button in properties ui).  This will also solve your problem.  You'll have to embed the font in this case because the scrollpane will not mask font's that are not embedded.  

    Flash-DB

    Yan

    • Server what's that
    • *
    • Posts: 4
      • View Profile
    Re:ScrollPane Pain
    « Reply #2 on: 08/27/02, 13:43 »
    Jeff,

    Tried both of your suggestions. Yes they work much better than before.
    Thank you so much for taking the time to help!

    Also want to take this opportunity to thank you for creating this site dedicated to database. This is a very important area in the real world of applications.

    I think from now on I will be visiting your site every day!

    Good work!

    Yan

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:ScrollPane Pain
    « Reply #3 on: 09/03/02, 11:47 »
    Flash-DB