「ActionScript アニメーション」の版間の差分
ナビゲーションに移動
検索に移動
1行目: | 1行目: | ||
− | ==ActionScript アニメーション== | + | ==[[ActionScript アニメーション]]== |
[[ActionScript]] | | [[ActionScript]] | | ||
===API=== | ===API=== | ||
====event.enterFrame==== | ====event.enterFrame==== | ||
− | *http://livedocs.adobe.com/flash/9.0_jp/ | + | *http://livedocs.adobe.com/flash/9.0_jp/[[ActionScript]]LangRefV3/flash/display/DisplayObject.html#event:enterFrame |
− | ====Event. | + | ====Event.ENTE[[R]]_F[[R]]AME==== |
− | *http://livedocs.adobe.com/flash/9.0_jp/ | + | *http://livedocs.adobe.com/flash/9.0_jp/[[ActionScript]]LangRefV3/flash/events/Event.html#ENTER_FRAME |
===例=== | ===例=== | ||
package | package | ||
30行目: | 30行目: | ||
addChild(txt); | addChild(txt); | ||
− | addEventListener(Event. | + | addEventListener(Event.ENTE[[R]]_F[[R]]AME, enterFrameHandler); |
} | } | ||
private function enterFrameHandler(e:Event):void { | private function enterFrameHandler(e:Event):void { |
2020年2月16日 (日) 04:21時点における版
ActionScript アニメーション
API
event.enterFrame
- http://livedocs.adobe.com/flash/9.0_jp/ActionScriptLangRefV3/flash/display/DisplayObject.html#event:enterFrame
Event.ENTER_FRAME
- http://livedocs.adobe.com/flash/9.0_jp/ActionScriptLangRefV3/flash/events/Event.html#ENTER_FRAME
例
package { import flash.display.Sprite; import flash.events.Event; import flash.events.TextEvent; import flash.text.TextField; public class SimpleEnterFrame extends Sprite { private var txt:TextField; public function SimpleEnterFrame() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { txt = new TextField(); txt.text = "Enter Frame"; txt.autoSize = "left"; addChild(txt); addEventListener(Event.ENTER_FRAME, enterFrameHandler); } private function enterFrameHandler(e:Event):void { trace(e); txt.y += 3; txt.x += 4; } } }
© 2006 矢木浩人