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

    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.