| Package | jp.naggg.effects |
| Class | public class TypeWriter |
| Inheritance | TypeWriter flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
| currentCharIndex : uint [read-only]
現在アニメーションをしているテキストが何文字目かを返します.
| TypeWriter | ||
| interval : uint
アニメーション間隔(速度)、ミリ秒で指定します.
| TypeWriter | ||
| isPlaying : Boolean [read-only]
アニメーションしているかどうか.
| TypeWriter | ||
| numChars : uint [read-only]
指定されたテキストが何文字かです.
| TypeWriter | ||
| useHTML : Boolean [read-only]
HTMLテキストを使うかどうかです.
これは途中で変更することはできません.
| TypeWriter | ||
| Method | Defined By | ||
|---|---|---|---|
TypeWriter(text:String, target:TextField, interval:uint = 20, useHTML:Boolean = false)
コンストラクタです.アニメーションの設定はすべてここで行います.
また、アニメーション設定はここでしかできないので注意が必要です.
| TypeWriter | ||
pause():void
アニメーションを一時停止します.
| TypeWriter | ||
play():void
アニメーションを開始します.
現在アニメーションを行っている場合は無視します.
| TypeWriter | ||
skip():void
アニメーションをスキップして一気にすべてを表示します.
| TypeWriter | ||
stop():void
アニメーションを停止します.
| TypeWriter | ||
toString():String [override]
文字列表現を返します.
| TypeWriter | ||
| currentCharIndex | property |
currentCharIndex:uint [read-only] 現在アニメーションをしているテキストが何文字目かを返します.
public function get currentCharIndex():uint| interval | property |
interval:uintアニメーション間隔(速度)、ミリ秒で指定します.
public function get interval():uint public function set interval(value:uint):void| isPlaying | property |
isPlaying:Boolean [read-only] アニメーションしているかどうか.
public function get isPlaying():Boolean| numChars | property |
numChars:uint [read-only] 指定されたテキストが何文字かです.
public function get numChars():uint| useHTML | property |
useHTML:Boolean [read-only] HTMLテキストを使うかどうかです. これは途中で変更することはできません.
public function get useHTML():Boolean| TypeWriter | () | Constructor |
public function TypeWriter(text:String, target:TextField, interval:uint = 20, useHTML:Boolean = false)コンストラクタです.アニメーションの設定はすべてここで行います. また、アニメーション設定はここでしかできないので注意が必要です.
Parameterstext:String — 表示したい文字列です.HTMLテキストを指定することもできます.
| |
target:TextField — テキストを表示する対象ダイナミックテキストフィールド.
| |
interval:uint (default = 20) — アニメーション間隔(ミリ秒)、デフォルトでは 20 ミリ秒です.
| |
useHTML:Boolean (default = false) — HTMLテキストを使用するかどうかのフラグです.
|
| pause | () | method |
public function pause():voidアニメーションを一時停止します.
| play | () | method |
public function play():voidアニメーションを開始します. 現在アニメーションを行っている場合は無視します.
| skip | () | method |
public function skip():voidアニメーションをスキップして一気にすべてを表示します.
| stop | () | method |
public function stop():voidアニメーションを停止します.
| toString | () | method |
override public function toString():String文字列表現を返します.
ReturnsString |
import jp.naggg.net.CacheBuster;
var tw:TypeWriter = new TypeWriter("Hello world!!", myText_txt, 250);
tw.onAnimationFinish = function(){
// TODO ここに終了後の処理を記述
}