TweenerでTextFieldの文字の色やサイズ・マージン等を変化させる

はてなブックマーク - TweenerでTextFieldの文字の色やサイズ・マージン等を変化させる
このエントリーをはてなブックマークに追加
Share on Facebook

Tweenerではオプション的に普段アクセス出来ない特殊なプロパティを扱う方法がある。
表題の件は、以下のような宣言をすることで使えるようになる。

AS3

import caurina.transitions.Tweener;
import caurina.transitions.properties.TextShortcuts;

TextShortcutsのリストをインポートしたら初期化

AS3

TextShortcuts.init();

これで、以下のようにTextFiledの値を変化させることができる。

AS3

Tweener.addTween(my_textFiled, { _text_color:0x00ffcc,_text_size:16,_text_leftMargin:50, time:1, transition:"linear" });

参考:http://www.tonpoo.com/tweener/properties/TextShortcuts.html

コメントをどうぞ

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <img localsrc="" alt="">