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

[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.*;
 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개

게시글 목록

번호 제목
2372
25946
14575
2367
29773
2358
2354
2350
29770
29766
24173
2345
25942
25939
29764
14571
14567
14561
24172
29763
14556
14550
14549
2332
14544
14535
14534
14529
2318
2313
2311
14526
14522
29761
25938
29759
2297
2281
25936
14521
14514
24167
25935
2266
14513
14512
2257
2230
14511
25926
14503
2224
25922
25920
2211
14500
2209
14499
24158
2204
14491
2197
14490
14489
2189
24155
14487
14486
25916
2185
29757
24154
25913
29755
14484
2181
2164
25907
2163
2153
2149
2145
2130
2116
2107
2103
29753
14483
2099
2039
29750
2021
2015
2006
14482
1989
1972
1969
14481
1963