VScrollBar sroll event : ScrollBar « Components « Flex






VScrollBar sroll event

VScrollBar sroll event
        
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        import mx.events.ScrollEvent;
        private function myScroll(event:ScrollEvent):void {
            showPosition.text = "Current scroll position: " + event.currentTarget.scrollPosition;
        }
      
    </mx:Script>
    <mx:Label width="100%" color="blue"
        text="Click on the scroll bar to view its properties." />
    <mx:VScrollBar id="bar" height="100%" 
                   minScrollPosition="0"
                   maxScrollPosition="{this.width - 20}" 
                   lineScrollSize="50"
                   pageScrollSize="100" 
                   repeatDelay="1000" 
                   repeatInterval="500"
                   scroll="myScroll(event);" />
    <mx:TextArea id="showPosition" height="100%" width="100%" color="blue" />
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Create a ScrollBar using and Create a ScrollBar using <mx:VScrollbar> and <mx:HScrollBar>
2.Add the HScrollBar and VScrollBar components to the applicationAdd the HScrollBar and VScrollBar components to the application
3.Set min/max scroll position for ScrollBarSet min/max scroll position for ScrollBar
4.ScrollBar SimpleScrollBar Simple
5.minScrollPosition,maxScrollPosition,lineScrollSize,pageScrollSize,repeatDelay,repeatIntervalminScrollPosition,maxScrollPosition,lineScrollSize,pageScrollSize,repeatDelay,repeatInterval