- 2008-11-19 (水) 17:55
- FLASH&AS3
なんか基本をすっ飛ばして切り貼りしつつ書いていたので、 せめて勉強できた分のメモを。
ちんぷんかんぷん\(^o^)/
●rootを指定するとき
MovieClip(root)
●preloader(使いこなせてない)
AS3 Apple Style Preloader
●イベントリスナー
追加 : ターゲット.addEventListener(イベント, リスナー関数) 削除 : ターゲット.removeEventListener(イベント, リスナー関数)
●スイッチ
target1.addEventListener(MouseEvent.CLICK, functionName); target2.addEventListener(MouseEvent.CLICK, functionName); function my_function(event_obj:MouseEvent) { switch(event_obj.currentTarget) { case target1: //target1から呼び出されたときの処理 break; case target2: //target2から呼び出されたときの処理 break; } }
●インターバル
setInterval(hogehoge, 2000);
●条件のand指定
if((条件1)&&(条件2)){}
●Boolean型を条件にするとき
if(boolean){} と if(boolean = true) が同義 if(!boolean){} と if(boolean = false) が同義
●Sound関連クラス 妙にややこしい 整理できてない
var sound:Sound = new Sound(); //音源が入るハコ var channel:SoundChannel = new SoundChannel(); //再生チャネルつくる var trans:SoundTransform = new SoundTransform(); //フェーダー? みたいなの? var myRequest:URLRequest = new URLRequest(“resource/sound.mp3″); sound.load(myRequest); //これで音がvar soundに読み込まれる channel = sound.play(0, 50, trans); //チャネルに音源を入れて再生 (start秒数, loop回数, SoundTransform) channel.stop(); //停止 sound.stop();でない。 参考 http://feb19.jp/blog/archives/000125.php http://d.hatena.ne.jp/spitfire_tree/20080420/1208672532
●マウスオーバーのカーソル変化をボタン
ターゲット名.buttonMode=true;
- Newer: Minefield x64 Editionなんて!
- Older: 同窓と語らい
Comments:0
Trackbacks:0
- Trackback URL for this entry
- http://blog.ayumusato.com/web/flashas3/%e8%aa%b2%e9%a1%8c%e3%81%a4%e3%81%84%e3%81%a7%e3%81%ab%e5%8b%89%e5%bc%b7%e3%81%97%e3%81%9fas3%e3%81%ae%e3%83%a1%e3%83%a2/trackback
- Listed below are links to weblogs that reference
- 課題ついでに勉強したAS3のメモ from ハブろぐ - blog.ayumusato.com