Mega Code Archive

 
Categories / Flex / Components
 

Create a ScrollBar using mx

and " src="http://www.rntsoft.com/Code/FlexImages/CreateaScrollBarusingmxVScrollbarandmxHScrollBar.PNG"          <?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>