チェンジセット 536
- コミット日時:
- 2008/05/28 01:02:22 (6 ヶ月前)
- ファイル:
-
- as3/Thread/branches/soumen/Thread.as3proj (更新) (2 diffs)
- as3/Thread/branches/soumen/samples/tweener (追加)
- as3/Thread/branches/soumen/samples/tweener/MainThread.as (追加)
- as3/Thread/branches/soumen/samples/tweener/Sample.as (追加)
- as3/Thread/branches/soumen/src/org/libspark/thread/threads/tweener (移動) (as3/Thread/branches/soumen/src/org/libspark/tweener から 移動)
- as3/Thread/branches/soumen/src/org/libspark/thread/threads/tweener/TweenerThread.as (更新) (5 diffs)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/Thread/branches/soumen/Thread.as3proj
r532 r536 18 18 <class path="samples\00.hello" /> 19 19 <class path="samples\urlloader" /> 20 <class path="samples\tweener" /> 20 21 </classpaths> 21 22 <!-- Build options --> … … 65 66 <!-- Class files to compile (other referenced classes will automatically be included) --> 66 67 <compileTargets> 67 <compile path="samples\ urlloader\Sample.as" />68 <compile path="samples\tweener\Sample.as" /> 68 69 </compileTargets> 69 70 <!-- Paths to exclude from the Project Explorer tree --> as3/Thread/branches/soumen/src/org/libspark/thread/threads/tweener/TweenerThread.as
r141 r536 1 package org.libspark.tweener 1 /* 2 * ActionScript Thread Library 3 * 4 * Licensed under the MIT License 5 * 6 * Copyright (c) 2008 BeInteractive! (www.be-interactive.org) and 7 * Spark project (www.libspark.org) 8 * 9 * Permission is hereby granted, free of charge, to any person obtaining a copy 10 * of this software and associated documentation files (the "Software"), to deal 11 * in the Software without restriction, including without limitation the rights 12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 * copies of the Software, and to permit persons to whom the Software is 14 * furnished to do so, subject to the following conditions: 15 * 16 * The above copyright notice and this permission notice shall be included in 17 * all copies or substantial portions of the Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 * THE SOFTWARE. 26 * 27 */ 28 package org.libspark.thread.threads.tweener 2 29 { 3 30 import caurina.transitions.Tweener; 4 31 import flash.display.DisplayObject; 32 import org.libspark.thread.IMonitor; 33 import org.libspark.thread.Monitor; 5 34 import org.libspark.thread.Thread; 6 35 36 /** 37 * @author yossy:beinteractive 38 */ 7 39 public class TweenerThread extends Thread 8 40 { … … 11 43 _target = target; 12 44 _args = args; 45 _monitor = new Monitor(); 13 46 14 47 args.onComplete = completeHandler; … … 17 50 private var _target:Object; 18 51 private var _args:Object; 52 private var _monitor:IMonitor; 19 53 20 protected override function initialize():void54 override protected function run():void 21 55 { 22 56 if ('show' in _args && _args.show) { … … 33 67 Tweener.addTween(_target, _args); 34 68 35 wait ();69 waitTween(); 36 70 } 37 71 38 pr otected override function execute():void72 private function waitTween():void 39 73 { 40 terminate(); 74 _monitor.wait(); 75 // TODO: 割り込み処理。今は無視 76 interrupted(waitTween); 41 77 } 42 78 … … 54 90 } 55 91 56 notifyAll(); 57 } 58 59 public override function toString():String 60 { 61 return '[Tweener]'; 92 _monitor.notifyAll(); 62 93 } 63 94 }
