A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Scrolling text

  1. #1
    Junior Member
    Join Date
    Jul 2001
    Posts
    9
    Can someone tell me wat the code would be to create a textfield that can scroll text of say max 10 lines or something?

    Or know of any tutorials here that I can get help from?
    Thanks

  2. #2
    Actkid
    Join Date
    Feb 2001
    Location
    Surat
    Posts
    764

    Wink Hi loup

    Hi loup!!

    Do u wann to make a scrolling text in text field then do following things:



    1. Select the multiline text box option and give the variable name to text box.

    2. Now make the two button for up and down for scrolling text.

    3. Now put the aciton on up button with this action:
    On(Release){
    <textboxvariable>.scroll = <textboxvariable>.scroll - 1;

    }

    4. Now put the aciton on Down button with this action:
    On(Release){
    <textboxvariable>.scroll = <textboxvariable>.scroll + 1;

    }


    thats all now u got it.

    Bye

  3. #3
    Member
    Join Date
    Aug 2000
    Posts
    75
    If you don't want the visitor to scroll any more then 10 lines, you should be able to throw an "if" statement into the down button. You wouldn't need to modify the "up" button because the textfield should never be scrolled down any more then 10 lines anyways.

    Try this :

    on (release) {
    if (<textboxvariable>.scroll<=10) {
    <textboxvariable>.scroll = <textboxvariable>.scroll + 1;
    }
    }



  4. #4
    Junior Member
    Join Date
    Jul 2001
    Posts
    8
    It might also be useful to know that:

    The .maxscroll property shows the maximum number of lines that can be scrolled. In fact the .scroll property, which you modify to scroll the text, indicates which is the first visible line in your text box, and this can assume a value of anything between 1 and .maxscroll

    For example, if your text box is 12 lines long and the text that you are displaying is 15 lines long, then, .maxscroll will have a value of 3 because you will only be permitted to scroll 3 lines down.

    This is useful when you are not sure of the length of the text you will be displaying, for example when it comes from a text file.

    regards

  5. #5
    Junior Member
    Join Date
    Jul 2001
    Posts
    9
    Thanks guys for all ur help!

    oh btw, when u say textbox with multiline...does that mean a dynamic text box?? cos there's input, dynamic and static...i'm not sure which one u mean.

  6. #6
    Actkid
    Join Date
    Feb 2001
    Location
    Surat
    Posts
    764
    Originally posted by loupDEreves
    Thanks guys for all ur help!

    oh btw, when u say textbox with multiline...does that mean a dynamic text box?? cos there's input, dynamic and static...i'm not sure which one u mean.
    Hi Loaup again,

    You have to take the dynamic text box and select the multiline option and as sunjiv <textboxvariable>.maxscroll will help out lot

    Do it.......Bye

  7. #7
    Junior Member
    Join Date
    Jul 2001
    Posts
    9

    resolved

    awesome. i'll try that out. thanks again.

    oh i dunno if anyoen can be bothered. but i've done a crappy page for a small local restaurant. they wanna buy it but i dunno what to charge.

    US dollars will be fine. I'm from australia so i'll just halve it. hehe
    But i have to take into consideration i'm stil a student, they're a small business...and it was also as part of a project.....

    so i dunno....
    anyway
    here u go

    http://www.geocities.com/shanikasproject2/

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