Changeset 2914
- Timestamp:
- 12/09/07 02:58:56 (5 years ago)
- Location:
- lang/actionscript/swfgmap/trunk
- Files:
-
- 4 modified
-
TestApp.as (modified) (1 diff)
-
TestApp.swf (modified) (previous)
-
gyuque/gmap/GMapView.as (modified) (1 diff)
-
gyuque/gmap/SpinResetAnimation.as (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/swfgmap/trunk/TestApp.as
r2913 r2914 38 38 protected function onSpinner(e:SliderEvent):void 39 39 { 40 mCurrentViewport.setNewRotation(mSpnr.value); 41 fireViewportChange(); 40 setViewRotation(mSpnr.value); 42 41 } 43 42 44 43 protected function onSpinReset(e:MouseEvent):void 45 44 { 46 var a:SpinResetAnimation = new SpinResetAnimation( mCurrentViewport);45 var a:SpinResetAnimation = new SpinResetAnimation(this, mSpnr.value); 47 46 addAnimation(a); 48 47 } 48 49 public override function setViewRotation(rad:Number):void 50 { 51 mSpnr.value = rad; 52 super.setViewRotation(rad); 53 } 54 49 55 } 50 56 } -
lang/actionscript/swfgmap/trunk/gyuque/gmap/GMapView.as
r2913 r2914 59 59 { 60 60 mCurrentViewport = v; 61 fireViewportChange(); 62 } 63 64 public function setViewRotation(rad:Number):void 65 { 66 mCurrentViewport.setNewRotation(rad); 61 67 fireViewportChange(); 62 68 } -
lang/actionscript/swfgmap/trunk/gyuque/gmap/SpinResetAnimation.as
r2913 r2914 3 3 public class SpinResetAnimation extends Animation 4 4 { 5 private var mViewport:GMapViewport; 6 public function SpinResetAnimation(vp:GMapViewport) 5 private var mView:GMapView; 6 private var mStart:Number; 7 private var STEPS:int = 6; 8 private var mCount:int = 0; 9 10 public function SpinResetAnimation(v:GMapView, start:Number) 7 11 { 8 mViewport = vp; 12 mView = v; 13 if (start > Math.PI) 14 start -= Math.PI*2; 15 mStart = start; 9 16 } 10 17 11 18 public override function next():Boolean 12 19 { 13 return false; 20 if (++mCount == STEPS) 21 { 22 mView.setViewRotation(0); 23 return false; 24 } 25 26 mView.setViewRotation(mStart / Math.pow(1.9, mCount)); 27 28 return true; 14 29 } 15 30 16 31 public override function skip():void 17 32 { 33 mView.setViewRotation(0); 18 34 } 19 35 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)