A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Dynamic Text Boxes

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    Dynamic Text Boxes

    What are dynamic text boxes?
    haha, ok Im joking


    Anyways, hey everyone. I have a question about Dynamic text boxes that could realy help me out.

    Ok, as you know, when you place a scroller component and target it to a dynamic text box, the scroll bar will appear once the text box's text passes the height of the text box itself.

    Hence the scroll.


    But until the text gets to that point, the scroll is not visible but the bar is, leaving the simple white rectangle. Looks rather bad.

    So my question is this. Is there way, when you put text into a dynamic text box, to tell if the text needs to be scrolled in which you then make visible a scroller component?

    Thanks everyone!



    Oh, and for those who helped me and my brother out on our first website, thanks alot (especially Kortex for his patience). You can see our website here at www.littlephotographer.ca

    Dont judge too harshly, it is our first website afterall

  2. #2
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    Well, when you put your text in, in the development environment, you should see there if it is going to need to scroll or not.

  3. #3
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    jweeks,

    Thats providing you already know whats going to be posted in the first place, in which you would then just use a static text box.

    In my question, I am referring to dynamic text boxes. In my situation, you will not know the length of text that will be contained in the dynamic text box. Which is where my question comes in

  4. #4
    Flash Filosopher
    Join Date
    Apr 2006
    Location
    Washington
    Posts
    68
    Well, at the moment I don't have enough knowledge to properly answer your question, but I did want to say that your site is very nice!!! I love the music; keep up the good work!

  5. #5
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Telmari

    Thanks for the compliment

  6. #6
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    I have no idea.. do you mean you want your scrollbar just stay there even if you don't need it?
    mmm easy just make a Dynamic Box on the right edge of the scroll bar (or i think you could do this) and just fit that with SPACE.
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  7. #7
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    No.

    If you leave the scrollbar there when you dont need it, it stays there as a white rectangle, which looks rather tacky.

    What I need is the component scrollbar to be invisible when the Flash loads up. The dynamic text box will then be filled with the text, and if that text goes passed the height of the dynamic text box storing it, then the scroller component becomes visable.

  8. #8
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    Superb website Osteel and Ostil
    Except can't you find a better scrolling sequence for the news section? I thought you could make your own scrollbars. silver don't fit with blue...
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  9. #9
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    I was lazy!

    Perhaps in the future, but either way, having the problem Im facing now will still happen with or without a self created scroller

  10. #10
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    oh.. er how about... making a invisible scrollbar... and so use a if function on the scrollbar:

    if(scrollbar._xscale != (it's full scale)) {
    realscrollbar._alpha = 0
    } else {
    realscrollbar._alpha = 100
    }

    ???
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  11. #11
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    The problem has nothing to do with the scroll bar, I'll just make it invisible.

    So something like this:

    code:

    if (textbox.text >= the amount it can store){
    scrollComponent._visible = true;
    }else{
    scrollComponent._visible = false;
    }





    By the amount it can store, I mean, the number of letters the text box can hold without needing to be scrolled.

  12. #12
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    mmm how about a KeyDown variable:

    var KeyDown = 0
    on(keyDown) {
    KeyDown += 1
    }
    if(Key.isDown(KEY.Backspace)) {
    KeyDown -= 1
    }
    if(KeyDown < 0){
    KeyDown = 0
    }
    if(KeyDown >= maxamount) {
    //the thing happens
    }



    Will this work?
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  13. #13
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    Ah geeze got to go, my mum's busting me off the computer LOL.
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

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