dcsimg
A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: DynamicTextFieldScroll

  1. #1
    Senior Member carbonX's Avatar
    Join Date
    Jul 2001
    Location
    Virginia
    Posts
    261

    Talking

    I have a dynamic text field with a variable name of "news".

    I have an #include statement calling an external .as file called "pirnie.as".

    #include "C:/almost_there/pirnie.as"
    //inside the .as file the variable news is defined

    So all the text from pirnie.as dynamicly loads into my text field, making it easy for others to input information into the field without having Flash.

    I'm using some basic html tags to shape the text in the .as file. It looks great! BUT, when I go to make this field scrollable, it wont work. Why?? Anyone know what I'm doing wrong???

  2. #2
    FK M.D. pheck's Avatar
    Join Date
    Jul 2001
    Location
    MN
    Posts
    807
    well a hack is to just put a bunch of returns after your #include AS. enough to extend past the height of your scrollbar (I'm assuming you're using the component).

  3. #3
    Senior Member carbonX's Avatar
    Join Date
    Jul 2001
    Location
    Virginia
    Posts
    261
    So am I to assume that the scroll component will not scroll text that has been dynamicly input?

    And when you say put a bunch of returns after the #include actionScript, you mean after the variable is defined in the .as put all the returns there? Like:
    news = "blah blah blah...



    //a bunch of returns


    "
    Because I have paragraphs of text, plenty enough to extend past the height of the field. I was wondering if it's not working because of the html tags in the .as
    Ex. news = "<b>THIS IS TEXT</B> THIS IS MORE...."

  4. #4
    FK's Official War Driver wiReZ's Avatar
    Join Date
    Jun 2002
    Location
    wireless
    Posts
    615

  5. #5
    FK M.D. pheck's Avatar
    Join Date
    Jul 2001
    Location
    MN
    Posts
    807
    i'm sure that macromedia method is better. the problem i was running into before was ensuring i had enough scroll space so that all my dynamic text would fit in there, for all the different dynamic text sets I was loading in that textfield. i havent' tested this method's approach, but hopefully it will dynamically update the scroll space for you each time the text changes. the hack i was refering to earlier was a way to just set the scroll space as large (statically) so no matter what was in there the scrolling space would be the same. and to do it you put the returns after the #include, not in the txt file itself.

  6. #6
    Senior Member carbonX's Avatar
    Join Date
    Jul 2001
    Location
    Virginia
    Posts
    261
    Awesome!!! I got it working now! Thank you both!

  7. #7
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Pheck,

    there is a different solution to a scrollbar and that is scrolling with buttons. That should be endless. I made a little tutorial on that.
    http://www.stormpages.com/cancerinfo...amic_font.html

  8. #8
    FK M.D. pheck's Avatar
    Join Date
    Jul 2001
    Location
    MN
    Posts
    807
    ci-
    thanks. did you do that in MX? i'm interested in dynamic updating of MX's scrollbar component. thanks again.

  9. #9
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    This is all for MX. Here are some more tutorials. There is one for a textfield using xml with scrollbars. All files can be downloaded.

    http://www.stormpages.com/cancerinfo...flashspot.html

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