Maybe effect is the wrong word, but...

I have an HBox with a bunch of images in it. Now, the number of images
exceeds the width I have for the box, so a scroll bar appears. No
problem, right.

I want to make it so you can mouse over the leftmost or rightmost ends
of the HBox and have it "auto scroll".

I have this code so far:
<mx:Script>
<![CDATA[
 function autoScroll(canvas):Void {
  var tolerance:Number = 100;
  if (canvas.mouseX > canvas.width - tolerance)
  canvas.hPosition += tolerance;
  else if (canvas.mouseX < tolerance)
  canvas.hPosition -= tolerance;        
 }
]]>
</mx:Script>

<mx:HBox height="300" width="400" id="myHBox" hScrollPolicy="on"
mouseOver="autoScroll(event.target)">
junk in HBox
</MX:HBox>

this works great, except you have to mouse over the edge, then out,
then over to continuously scroll. I want something that will auto
scroll while the mouse is hovering over the edge of the box.

any ideas?

Thanks

Jeff






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to