[ActionScript 3.0] , MovieClipWithPlaying , 현제 무비클립이 재생 중인지 체크하기 위해서 정보
Flash [ActionScript 3.0] , MovieClipWithPlaying , 현제 무비클립이 재생 중인지 체크하기 위해서본문
[설명 및 사용방법]
flash 컨텐츠 작업을 하다 보면 하당 movieclip이 재생 중인 아니면 정지해 있는지 알아야 할 경우가 생김니다.
flash animation 을 다른 무비클립에서 로드를 하여 플레이를 시킨다고 가정 한다면, 컨텐츠 플레이어를 제작 할 경우 유용하게 이용 할 수 있습니다.
사용방법은 해당 flash animation 컨텐츠이 document class 를 MovieClipWithIsPlaying 으로 지정 해주고 사용 하면 됩니다.
package com.visualp{
import flash.display.*;
import flash.text.*;
import flash.external.ExternalInterface;
import flash.events.*;
import flash.net.*;
import flash.text.*;
import flash.external.ExternalInterface;
import flash.events.*;
import flash.net.*;
public class MovieClipWithIsPlaying extends MovieClip {
private var _isPlaying:Boolean = true;
public function get isPlaying():Boolean {
return _isPlaying;
}
/**
* Constructor
*/
public function MovieClipWithIsPlaying(){
super();
}
private var _isPlaying:Boolean = true;
public function get isPlaying():Boolean {
return _isPlaying;
}
/**
* Constructor
*/
public function MovieClipWithIsPlaying(){
super();
}
public override function gotoAndPlay(frame:Object, scene:String = null):void {
_isPlaying = true;
super.gotoAndPlay(frame, scene);
}
public override function gotoAndStop(frame:Object, scene:String = null):void {
_isPlaying = false;
super.gotoAndStop(frame, scene);
}
public override function nextFrame():void {
_isPlaying = false;
super.nextFrame();
}
public override function nextScene():void {
_isPlaying = true;
super.nextScene();
}
public override function play():void {
_isPlaying = true;
super.play();
}
public override function prevFrame():void {
_isPlaying = false;
super.prevFrame();
}
public override function prevScene():void {
_isPlaying = true;
super.prevScene();
}
public override function stop():void {
_isPlaying = false;
super.stop();
}
}
}
추천
1
1
댓글 1개
감사합니다~~