Changeset 8181 for lang/actionscript
- Timestamp:
- 03/20/08 13:17:09 (5 years ago)
- Location:
- lang/actionscript/doubleslider
- Files:
-
- 7 modified
-
DTest.as (modified) (2 diffs)
-
DTest.swf (modified) (previous)
-
SampleTimeline.as (modified) (1 diff)
-
SampleTimeline.swf (modified) (previous)
-
doubleslider/DBar.as (modified) (3 diffs)
-
doubleslider/DoubleSliderEvent.as (modified) (1 diff)
-
dstest.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/doubleslider/DTest.as
r8180 r8181 17 17 mBar.addEventListener(DoubleSliderEvent.HIT_POSITION, onHitPosition); 18 18 mBar.addEventListener(DoubleSliderEvent.HIT_HALF_POSITION, onHitHalfPosition); 19 mBar.addEventListener(DoubleSliderEvent.POSITION_CHANGED, onPositionChanged); 19 20 20 21 var lp:TestLabelProvider = new TestLabelProvider(); … … 69 70 } 70 71 72 private function onPositionChanged(e:DoubleSliderEvent):void 73 { 74 if (mUseExternal) 75 { 76 try 77 { 78 ExternalInterface.call("onDoubleSliderPositionChanged", e.fixedPosition); 79 } 80 catch(e:Error) 81 { 82 } 83 } 84 } 85 71 86 private function api_init():Boolean 72 87 { -
lang/actionscript/doubleslider/SampleTimeline.as
r8180 r8181 34 34 Security.allowDomain("localhost"); 35 35 ExternalInterface.addCallback("showAndAnimation", showAndAnimation); 36 ExternalInterface.addCallback("singleFrame", singleFrame); 36 37 } 37 38 catch(e:Error) { -
lang/actionscript/doubleslider/doubleslider/DBar.as
r8180 r8181 145 145 } 146 146 147 private function fireChangedEvent(pos:int):void 148 { 149 var e:DoubleSliderEvent = new DoubleSliderEvent(DoubleSliderEvent.POSITION_CHANGED); 150 e.fixedPosition = pos; 151 dispatchEvent(e); 152 } 153 147 154 public function endAnimation():void 148 155 { … … 160 167 if (thumb == mDownThumb) 161 168 { 169 fireChangedEvent(mDownThumb.position); 162 170 mUpThumb.position = mDownThumb.position; 163 171 endAnimation(); … … 168 176 if (mUpThumb.dragging) 169 177 { 178 fireChangedEvent(mUpThumb.position); 170 179 mUpThumb.resetOffset(); 171 180 -
lang/actionscript/doubleslider/doubleslider/DoubleSliderEvent.as
r8177 r8181 5 5 { 6 6 public static const HIT_POSITION:String = "dsevent_hit_position"; 7 public static const POSITION_CHANGED:String = "dsevent_position_changed"; 7 8 public static const HIT_HALF_POSITION:String = "dsevent_hit_half_position"; 8 9 function DoubleSliderEvent(type:String) -
lang/actionscript/doubleslider/dstest.js
r8180 r8181 3 3 function onDoubleSliderHitPosition() 4 4 { 5 } 6 7 function onDoubleSliderPositionChanged(pos) 8 { 9 document.getElementById("timelineswf").singleFrame(pos); 5 10 } 6 11
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)