its kool ...thanks

On Jan 5, 4:11 pm, sheetal <sheetalnilw...@gmail.com> wrote:
> This is just to share a custom scroll bar with all of you.
> Plz replace the images.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="absolute" mouseUp="onStop()">
> <mx:Script>
>         <![CDATA[
>                 import mx.controls.Alert;
>
>                 private var isTrue:Boolean=false;
>                 private var trackScrollTimer:Timer;
>
>                 private function onLeft(e:MouseEvent):void
>                 {
>                         if(e.buttonDown)
>                         {
>                                 trace(e.eventPhase);
>                                 mainCanvas.horizontalScrollPosition--;
>                                 trackScrollTimer = new Timer(1, 0);
>                                 
> trackScrollTimer.addEventListener(TimerEvent.TIMER, function
> (t:TimerEvent):void{trackScrollTimer.stop(); onLeft(e);});
>                                 trackScrollTimer.start();
>
>                         }
>                 }
>                 private function onRight(e:MouseEvent):void
>                 {
>                         if(e.buttonDown && 
> mainCanvas.horizontalScrollPosition!
> =mainCanvas.maxHorizontalScrollPosition)
>                         {
>                                 trace(e.eventPhase);
>                                 mainCanvas.horizontalScrollPosition++;
>                                 trackScrollTimer = new Timer(1, 0);
>                                 
> trackScrollTimer.addEventListener(TimerEvent.TIMER, function
> (t:TimerEvent):void{trackScrollTimer.stop(); onRight(e);});
>                                 trackScrollTimer.start();
>
>                         }
>                 }
>
>                 private function onUp(e:MouseEvent):void
>                 {
>                         if(e.buttonDown)
>                         {
>                                 trace(e.eventPhase);
>                                 mainCanvas.verticalScrollPosition--;
>                                 trackScrollTimer = new Timer(1, 0);
>                                 
> trackScrollTimer.addEventListener(TimerEvent.TIMER, function
> (t:TimerEvent):void{trackScrollTimer.stop(); onUp(e);});
>                                 trackScrollTimer.start();
>
>                         }
>                 }
>                 private function onDown(e:MouseEvent):void
>                 {
>                         if(e.buttonDown && 
> mainCanvas.horizontalScrollPosition!
> =mainCanvas.maxVerticalScrollPosition)
>                         {
>                                 trace(e.eventPhase);
>                                 mainCanvas.verticalScrollPosition++;
>                                 trackScrollTimer = new Timer(1, 0);
>                                 
> trackScrollTimer.addEventListener(TimerEvent.TIMER, function
> (t:TimerEvent):void{trackScrollTimer.stop(); onDown(e);});
>                                 trackScrollTimer.start();
>
>                         }
>                 }
>
>                 private function onStop():void
>                 {
>                         if( trackScrollTimer!=null)
>                          trackScrollTimer.stop();
>                 }
>
>         ]]>
> </mx:Script>
> <mx:Canvas width="100%" height="100%">
>         <mx:Image source="up.JPG" x="386" y="26" mouseDown="onUp(event)"
> mouseUp="onStop()"/>
>         <mx:Image source="down.JPG" x="386" y="266" mouseDown="onDown(event)"
> mouseUp="onStop()"/>
>         <mx:Image source="left.JPG" x="252" y="148" mouseDown="onLeft(event)"
> mouseUp="onStop()"/>
>         <mx:Image source="right.JPG" x="504" y="148" mouseDown="onRight
> (event)" mouseUp="onStop()"/>
>         <mx:Canvas id="mainCanvas" width="200" height="200" x="296" y="58"
> borderColor="#000000" borderStyle="solid" verticalScrollPolicy="off"
>                  horizontalScrollPolicy="off" horizontalPageScrollSize="1" >
>            <mx:Image source="@Embed(source='Sunset.jpg')"/>
>         </mx:Canvas>
> </mx:Canvas>
>
>         </mx:Application>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to