Dynamicなクラスを定義し、そのpropertyもDyanmicに複数設定したい
例えば、Dynamic Loaderを定義して、Loaderに自由にプロパティーを定義できるようになりますが、その際に、あらかじめプロパティー名をコードに書いておくのではなくて、例えばXMLで得た情報をもとに、Dynamic LoaderにDynamicにプロパティー名を定義し、そこに値を入れたい場合に問題になります。
そこで、ObjectとDictionaryの関係のDictionaryのように、Stringをもとにプロパティーを定義する方法。
下記のようにあるkey stringをもとに、Key Objectを返すクラスを作成。
package {
public class ObjectUtil{
public static function getKeyObj(keyStr:String):Object{
var keyObj:Object = new Object();
keyObj.toString = function():String { return keyStr;};
return keyObj;
}
}
}
private function init():void{
var dLoader:DynamicLoader = new DynamicLoader();
var propName:String = "hogeUrl";//ここはXML等から取得してもいい。
var keyObj:Object = ObjectUtil.getKeyObj(propName);
dLoader[keyObj] = "http://hoge.com";
trace("property:",dLoader.hogeUrl);
}
ActionScriptをコードをブログに引用するにあたってハイライトさせたいなと思いつつ、なかなかいい方法がみつからず、とりあえず、現状でベストな方法があったので、メモ。 。
欲しい機能。
-行番号がでる。
-copy & pasteサポート
-code indentをサポート
-いちいち変換サービスを使わず、JSとかで自動的にやってほしい。
-js,as,xml,perl等ある程度言語をカバーしておいてほしい。
結局使ったのは、http://code.google.com/p/syntaxhighlighter/。で、これだけでは、ASに対応していないので、下記のサイトのJSを追加。
http://www.digitalflipbook.com/archives/2007/09/as3_syntax_high.php
下記のような感じで、引用ができる。。。結局FLASHつかっているぽい。
ここにcodeを記述
Loaderに対していろいろプロパティを付けたいなーと思ったときに。。Loaderを Dynamicにするだけ。。
public dynamic class DynamicLoader extends Loader{
public function DynamicLoader(){
super();
}
引用元サイト:Google Developer Dayということで、OpenSocialとかAppEngineとか興味ありげな要素満載なので、参加予定。
Google Developer Day 2008 に参加しよう! ソーシャルアプリケーション、モバイルアプリケーション、マップアプリケーション、AJAX / JavaScript アプリケーション開発に最も適した Google プロダクトの活用方法
引用元サイト:Ajaxian » Adobe AIR for JavaScript Developers Pocketguideajaxianから。無料でオライリー本がダウンロード。Mike,Danielとかが書いているようですね。
Adobe AIR for JavaScript Developers Pocketguide Category: AdobeView the technorati tag: Adobe AIR for JavaScript Developers Book Cover Adobe AIR for JavaScript developers provides an introduction to Adobe AIR for developers using interested in building AIR applications using JavaScript, HTML and CSS. The book has been updated for the latest and greatest, and is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. Yup, the book is free.
引用元サイト:Away3D Flash Engine » Away3D 2.0: Green Planet
AWAY3D 2.0 IS HERE! Our new release may bring out the explorer in you, with features allowing a lot more expansive 3d possibilities. Here we present an atmospheric oddessey taking the reliable formula of a crash-landed spaceship and an alien world... Green Planet. Now you can realize your 3D world like never before in Flash.
引用元サイト:Browse Project - Adobe Bug SystemFLASH Playerに起因するバグを検索するときに役に立ちます。
Reports Recently Created Issues Report Created vs Resolved Issues Report Pie Chart Report Timechart Report Single Level Group By Report
引用元サイト:Reflektions miniml > 3D carrousel in AS3 v3: rotating menuこういうの好き
3D carrousel in AS3 v3: rotating menu Based on the 3D carrousel in AS3 post I added z sorting and depth management in the last post where I sorted the array of items by z distance to the camera using the Array.sort() method. The following function is the one that evaluates all z values and sorts the array by ascending order.
引用元サイト:Adobe - Adobe AIR コンテスト (エアコン) 開催! ~デスクトップを制するものは、未来も制す~だそうで、新しいアプリケーションが登場するのでしょうか?
アドビの新しいランタイム Adobe® AIR® 1.0 向けのアプリケーション、コンテンツ制作にチャレンジする次世代リーダーを発掘することを目的に、コンテストを実施します。 今あるWeb制作スキルを生かして、ブラウザを越えた表現の可能性を追求する方からの多くの募集を期待いたします。