- コミット日時:
- 2011/08/15 09:55:35 (9 ヶ月前)
- ファイル:
-
- air/clayg/jp/clayg/display/DisplayFps.as (更新) (1 diff)
- air/clayg/jp/clayg/display/VerticalScrollBox.as (更新) (1 diff)
- air/clayg/jp/clayg/framework/smarty/Smarty.as (更新) (13 diffs)
- air/clayg/jp/clayg/funcs/capture.as (更新) (1 diff)
- air/clayg/jp/clayg/funcs/findInstance.as (追加)
- air/clayg/jp/clayg/funcs/findInstances.as (追加)
- air/clayg/jp/clayg/funcs/sprintf.as (更新) (1 diff)
- air/clayg/jp/clayg/net/QuickLoad.as (更新) (1 diff)
- air/clayg/jp/clayg/system/KeyState.as (更新) (1 diff)
- air/clayg/jp/clayg/system/MouseState.as (更新) (1 diff)
- air/clayg/jp/clayg/system/SoundManager.as (更新) (2 diffs)
- air/clayg/jp/clayg/utils/Finder.as (削除)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
air/clayg/jp/clayg/display/DisplayFps.as
r4599 r4605 10 10 11 11 /** 12 * ...12 * DisplayFpsクラスは、フレームレートを画面に表示するためのクラスです. 13 13 * @author Mr.Grotesque 14 14 */ air/clayg/jp/clayg/display/VerticalScrollBox.as
r4603 r4605 5 5 6 6 /** 7 * VerticalScrollBoxクラスは、スクロール を提供し、自動的に縦整列するコンテナクラスです.7 * VerticalScrollBoxクラスは、スクロールするコンテナを提供し、各要素を自動的に縦整列するクラスです. 8 8 * @author Mr.Grotesque 9 9 */ air/clayg/jp/clayg/framework/smarty/Smarty.as
r4603 r4605 16 16 import flash.media.StageWebView; 17 17 import flash.net.SharedObject; 18 import flash.system.Capabilities; 18 19 import flash.text.TextField; 19 20 import jp.clayg.framework.smarty.lisp.*; … … 26 27 import jp.clayg.system.SoundManager; 27 28 import jp.clayg.utils.DelayFrame; 28 import jp.clayg.utils.Finder;29 29 import jp.clayg.utils.Strings; 30 30 … … 35 35 public class Smarty extends MovieClip 36 36 { 37 private static var _flashWidth:int; 38 private static var _flashHeight:int; 37 private static var _flashWidth:uint; 38 private static var _flashHeight:uint; 39 private static var _stageWidth:uint; 40 private static var _stageHeight:uint; 39 41 private static var _contentRect:Rectangle; 40 42 private static var _counter:uint; … … 52 54 private static var ms:MouseState; 53 55 private static var ss:Strings; 54 private static var fd:Finder;55 56 private static var lp:Lisp; 56 57 … … 75 76 stage.align = StageAlign.TOP_LEFT; 76 77 77 _contentRect = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight); 78 _stageWidth = stage.stageWidth; 79 _stageHeight = stage.stageHeight; 80 81 // TODO:Air for IOSだとstage.stageWidthがちゃんと取得できないバグがあるための対策 82 // ↓ バグが治ったら消したい 83 if ( Capabilities.os.slice(0,3) == "iPh" ) 84 { 85 _stageWidth = Capabilities.screenResolutionX; 86 _stageHeight = Capabilities.screenResolutionY; 87 } 88 // ↑バグが治ったら消したい 89 90 _contentRect = new Rectangle(0, 0, stageWidth, stageHeight); 78 91 79 92 // 背景 … … 84 97 addEventListener(Event.ENTER_FRAME, function(){ _counter++; }); 85 98 86 sm = new SceneManager(this);99 sm = new SceneManager(this); 87 100 ql = new QuickLoad(); 88 101 df = new DelayFrame(stage); … … 90 103 ms = new MouseState(stage); 91 104 ss = new Strings(); 92 fd = new Finder();93 105 94 106 lp = new Lisp(); … … 97 109 98 110 99 mainScale( new Rectangle( 0, 0, stage .stageWidth, stage.stageHeight ) );111 mainScale( new Rectangle( 0, 0, stageWidth, stageHeight ) ); 100 112 } 101 113 … … 128 140 { 129 141 adHide(); 130 142 131 143 swv = new StageWebView(); 132 144 swv.stage = stage; 133 swv.viewPort = new Rectangle(0,0,stage .stageWidth,adHeight);145 swv.viewPort = new Rectangle(0,0,stageWidth,adHeight); 134 146 swv.loadURL(adUrl); 135 147 136 mainScale( new Rectangle(0, adHeight, stage.stageWidth, stage.stageHeight-adHeight ) ); 137 148 mainScale( new Rectangle(0, adHeight, stageWidth, stageHeight-adHeight ) ); 138 149 } 139 150 … … 147 158 swv.stage = null; 148 159 swv = null; 149 mainScale( new Rectangle( 0, 0, stage .stageWidth, stage.stageHeight ) );160 mainScale( new Rectangle( 0, 0, stageWidth, stageHeight ) ); 150 161 } 151 162 … … 190 201 191 202 /** 203 * 端末に表示されているコンテンツ領域の幅を取得します. 204 */ 205 public static function get stageWidth():uint 206 { 207 return _stageWidth; 208 } 209 210 /** 211 * 端末に表示されているコンテンツ領域の高さ取得します. 212 */ 213 public static function get stageHeight():uint 214 { 215 return _stageHeight; 216 } 217 218 /** 192 219 * 広告を除いた領域であるコンテンツ領域を取得します. 193 220 */ … … 501 528 502 529 /** 503 * コンテナから TextFieldを取得します.504 */ 505 public static function find TextField(container:DisplayObjectContainer, name:String):TextField506 { 507 return fd.findTextField(container, name);530 * コンテナからインスタンスを取得します. 531 */ 532 public static function findInstance(container:DisplayObjectContainer, cls:Class, name:String):* 533 { 534 return jp.clayg.funcs.findInstance(container, cls, name); 508 535 } 509 536 … … 511 538 * コンテナからMovieClipを取得します. 512 539 */ 513 public static function find MovieClip(container:DisplayObjectContainer, name:String):MovieClip514 { 515 return fd.findMovieClip(container, name);540 public static function findInstances(container:DisplayObjectContainer, cls:Class):Array 541 { 542 return jp.clayg.funcs.findInstances(container, cls); 516 543 } 517 544 air/clayg/jp/clayg/funcs/capture.as
r4603 r4605 10 10 11 11 /** 12 * キャプチャーします.12 * DisplayObjectをキャプチャーします. 13 13 * @param disp キャプチャ対象オブジェクト 14 14 * @param container キャプチャ場所のオブジェクト(nullでparent) air/clayg/jp/clayg/funcs/sprintf.as
r4565 r4605 1 1 package jp.clayg.funcs 2 2 { 3 /** 4 * C言語でお馴染みのsprintf関数を実行します. 5 * @param fmt 6 * @param ...rest 7 * @return 8 */ 3 9 public function sprintf(fmt:String, ...rest): String { 4 10 var idx:int = 0; air/clayg/jp/clayg/net/QuickLoad.as
r4599 r4605 8 8 import flash.net.URLRequest; 9 9 10 /** 11 * QuickLoadクラスは、ファイルを気軽に読み込むクラスです. 12 */ 10 13 public class QuickLoad 11 14 { air/clayg/jp/clayg/system/KeyState.as
r4562 r4605 8 8 9 9 /** 10 * キーステートクラスは、キーボードのキー状態を監視します.10 * KeyStateは、キーボードのキーの状態を取得するクラスです. 11 11 * 主にstateメソッドを使用してキーの状態を取得します。判定できるキー状態の種類は、 12 12 * 押されていない(KeyState.UP) 押された瞬間(KeyState.PUSH) 押されている間(KeyState.DOWN) 離された瞬間(KeyState.PRESS) と少し特殊な KeyState.SELECTです。 air/clayg/jp/clayg/system/MouseState.as
r4599 r4605 6 6 import flash.geom.Point; 7 7 import flash.utils.getTimer; 8 8 9 /** 9 * ...10 * MouseStateクラスは、マウスの状態を取得するためのクラスです. 10 11 * @author Mr.Grotesque 11 12 */ air/clayg/jp/clayg/system/SoundManager.as
r4599 r4605 7 7 8 8 /** 9 * ...10 * @author ...9 * SoundManagerクラスは、サウンドを管理するためのクラスです. 10 * @author Mr.Grotesque 11 11 */ 12 12 public class SoundManager … … 58 58 delete sndCnlHash[name]; 59 59 } 60 61 62 60 } 63 64 61 }

