테스트 사이트 - 개발 중인 베타 버전입니다

[ActionScript 3.0] , MovieClipWithPlaying , 현제 무비클립이 재생 중인지 체크하기 위해서

· 13년 전 · 1239 · 1
[설명 및 사용방법]
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.*;
 public class MovieClipWithIsPlaying extends MovieClip {
  
  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개

감사합니다~~

게시글 목록

번호 제목
3182
3171
3165
3163
14999
14998
14991
14984
14982
14979
14978
14977
3155
14976
14963
14960
14957
3151
3143
14951
3135
3132
14948
14941
29815
14939
14936
14935
3119
3113
14933
14929
3110
14928
14923
14921
3091
3087
3078
26068
3067
24252
14918
3061
3059
3053
14915
3049
14912
14911
14909
3040
3033
3027
3022
14908
24246
14905
3015
14904
14899
3007
14884
24241
3001
2997
14880
2991
2984
14879
2975
24232
14872
2970
24231
2967
2958
14864
2952
14858
24230
14850
2950
14848
14846
14845
14839
2944
2932
14833
14832
14830
2927
14826
26056
2921
2911
14824
2906
2889