A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: ScrollPane with Dynamic content: No scroll bar showing

  1. #1
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262

    ScrollPane with Dynamic content: No scroll bar showing

    I'm loading text from an external txt file into a dynamic text field. This dynamic text field is inside a movie clip, which is loaded into the ScrollPane.

    The text shows up in the ScrollPane, and when testing locally the scroll bar appears and works, but when I'm testing online the text still appears in the ScrollPane, but there is not scroll bar... it is cut off at the bottom of the ScrollPane with no scrolling ability. Why isn't the scroll bar showing when testing online? The MC being loaded into the scroll pane is called "newsContent" and the scroll pane is called "scrollPane".
    Code:
    //Dynamic News Section
    _root.contentNews.scrollPane.contentPath = "newsContent";
    var mcMain:MovieClip;
    mcMain = _root.contentNews.scrollPane.content;
    newsLoadVars = new LoadVars();
    newsLoadVars.onLoad = function() {
         mcMain.newsText.autoSize = true;
         mcMain.newsText.htmlText = newsLoadVars.myHTMLdata;
    }
    newsLoadVars.load("newsContent.txt");
    Last edited by dtone314; 03-11-2010 at 12:48 PM.
    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

  2. #2
    </hate> dtone314's Avatar
    Join Date
    Jun 2005
    Location
    CA
    Posts
    262
    Solved...
    I added
    Code:
    _root.contentNews.scrollPane.invalidate()
    to the end of my onLoad function, which updates the scroll bar to fit the new content

    Hope this helps someone down the road!
    -dtøne-
    Flash CS4 | AS2
    Life is a journey, not a destination.

Tags for this Thread

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