my interests and experiences
RSS icon Email icon Home icon
  • Flash Scrollpane – mouse wheel

    Posted on March 25th, 2008 whodeee 2 comments

    This was something that was driving me nuts a few months ago so I thought I would add it here. When I was dynamically loading content into a scrollpane in flash, I wanted to use the mouse wheel to scroll the content. I could adjust the amount that it would scroll by using:

    ///my_sp is the instance of the scrollpane
    my_sp.vLineScrollSize = 50;

    But it seemed to just randomly scroll every once in a while. I realized that is was because the mouse pointer just happened to be on the loaded text at that given time. So the work around I found for this was to add a rectangle to the lower most layer of the movieclip that was being loaded into the scrollpane. I set the alpha of it to zero and wahlah – it worked. Seems like a flaw in the scrollpane if you ask me.


    2 responses to “Flash Scrollpane – mouse wheel”

    1. I was having the same problem and had also traced it to text with links. I used your rectangle trick, great solution!

    2. I am glad it helped! Those Flash Components can be a nightmare. I am working with some of the Learning Interaction components now and those are even more fun!

    Leave a reply