dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: ScrollBar component trouble

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    2

    Post

    I'm having trouble with the scrollbar. I created a movieClip with a dynamic text box and loadvariables from a .txt file for that text box. And in that movieClip I have the scrollbar component. The text I load is larger at least 3x the size of the text box. But for some reason the scrollbar is inactive (not clickable the buttons) and it doesn't scroll. The scrollbar is targeting the text box. I experimented around and change the text box to a input type, and typed in a character at the end of the load txt files (I enable selectable in order to do so) and somehow the scrollbar became active and the drag able button appear too. (I also tried it with out the selectable and the same result appeared)

    But I want my text to be dynamic without having the user to type a character to active the scrollbar.

    Can someone please explain to me what is going on or at least point me to the right documentation to read(I look at the help page provide with flash MX no help there)

  2. #2
    Member
    Join Date
    Apr 2002
    Posts
    65

    LOL same time, SAME PROBLEM!!!!

    Yo we are having the same Problem... what to do?

  3. #3
    Member
    Join Date
    Apr 2002
    Posts
    65

    Thanx to Old newbie!

    Finally made it!

    Component scrollbar & dynamic html formated text loaded from a text file:

    http://blake.prohosting.com/~tektips/dynamicText.htm

    Files: http://blake.prohosting.com/~tektips/dynamic.zip

  4. #4
    Member
    Join Date
    Apr 2002
    Posts
    65

    found a faster way.......

    From the root load the variables into a movieClip like this...
    <someClip>
    onClipEvent(load)
    {
    loadVariables("file.txt",this)
    }


    in the timeline wher you scrollbar and textbox are in the actions on the first fram of the time line do this.....

    instanceOfTextField.html = true
    instanceOfTextField.htmlText = _root.someClip.variableName

    and Voila...this way is better cause now you can reference all the variable from the root. Rather than referencing from within the movieClip.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    And this is even better:


    loadVarsText = new LoadVars();
    loadVarsText.load("text1.txt");
    loadVarsText.onLoad = function(success) {
    if (success) {
    // trace ("done loading");
    scrollbar1.setScrollPosition(0);
    loadText.text = this.loadText;
    } else {
    // trace ("not loaded");
    }
    }

  6. #6
    Member
    Join Date
    Apr 2002
    Posts
    65

    OldnewBie that is good but where does it go?

    and why is it better it requires more coding?....

    Originally posted by oldnewbie
    And this is even better:


    loadVarsText = new LoadVars();
    loadVarsText.load("text1.txt");
    loadVarsText.onLoad = function(success) {
    if (success) {
    // trace ("done loading");
    scrollbar1.setScrollPosition(0);
    loadText.text = this.loadText;
    } else {
    // trace ("not loaded");
    }
    }

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