SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member Macguiver's Avatar
    Join Date
    Feb 2004
    Location
    Orlando, Fl
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up scrolling question

    how do i get my text to scroll all the way down and back up when the mouse hovers over the scroll up button and scroll down button?

  2. #2
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    if your textfield is named "myTxt"(without quotes) then you can use the following actions.

    Code:
    myTxt.scroll = myTxt.scroll+5
    The above action is for scrolling down 5 lines.

    Code:
    myTxt.scroll = myTxt.scroll-5
    The above action is for scrolling up 5 lines.


    Just place these actions on the rollover or press events of the respective buttons. However, this will scroll only once. To scroll again, you'll have to place the mouse on the button again or press it again(according to the event which runs the action). A better way for scrolling continously will be to place this scroll up & scroll down actions in seperate functions & place those functions on the onenterframe event of the movie.


    However, if you are using FlashMX or FlashMX 2004, you can use the scrollbar component & bind it to a textfield by just entering the name of the textfield in the scrollbar's property inspector. Its just that easy. You can find more at www.actionscript.org
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  3. #3
    SitePoint Member Macguiver's Avatar
    Join Date
    Feb 2004
    Location
    Orlando, Fl
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    But But ???

    Quote Originally Posted by asp_funda
    if your textfield is named "myTxt"(without quotes) then you can use the following actions.

    Code:
    myTxt.scroll = myTxt.scroll+5
    The above action is for scrolling down 5 lines.

    Code:
    myTxt.scroll = myTxt.scroll-5
    The above action is for scrolling up 5 lines.


    Just place these actions on the rollover or press events of the respective buttons. However, this will scroll only once. To scroll again, you'll have to place the mouse on the button again or press it again(according to the event which runs the action). A better way for scrolling continously will be to place this scroll up & scroll down actions in seperate functions & place those functions on the onenterframe event of the movie.


    However, if you are using FlashMX or FlashMX 2004, you can use the scrollbar component & bind it to a textfield by just entering the name of the textfield in the scrollbar's property inspector. Its just that easy. You can find more at www.actionscript.org

    yeah thats what i want. I want it that it would keep scrolling the text all the way down and up once the mouse is over the button and that it would stop scrolling when u take the mouse off.

    whats the scrip for that not using a scroll bar but just 2 buttons one for up and one for down?

  4. #4
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    see if you can find it at http://www.actionscript.org/tutorials.shtml. I'm in a kinda rush at the moment & if you don't find anything till tomorrow or if no one posts a solution, I'll post it tomorrow.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  5. #5
    SitePoint Member Macguiver's Avatar
    Join Date
    Feb 2004
    Location
    Orlando, Fl
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Still havent got it

    Quote Originally Posted by asp_funda
    see if you can find it at http://www.actionscript.org/tutorials.shtml. I'm in a kinda rush at the moment & if you don't find anything till tomorrow or if no one posts a solution, I'll post it tomorrow.

    I still havent been able to get the script for auto smooth scrolling when the mouse hovers over the up or down button like this http://www.teamjetspeed.com/

  6. #6
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That's not Flash if you wanna know. Its done through JavaScript & you can find a similar one at http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm & another one at http://www.dynamicdrive.com/dynamici...nualscroll.htm. Though the same thing can easily be done through Flash/Actionscript too. I think more easily than done through JavaScript.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  7. #7
    SitePoint Member Macguiver's Avatar
    Join Date
    Feb 2004
    Location
    Orlando, Fl
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by asp_funda
    That's not Flash if you wanna know. Its done through JavaScript & you can find a similar one at http://www.dynamicdrive.com/dynamicindex11/scrollc2.htm & another one at http://www.dynamicdrive.com/dynamici...nualscroll.htm. Though the same thing can easily be done through Flash/Actionscript too. I think more easily than done through JavaScript.
    thanks alot and I figured out to get it done in flash

  8. #8
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •