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

[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개

게시글 목록

번호 제목
1959
14479
14475
14474
14469
14466
29747
14464
14463
1950
1943
1938
14460
29743
14453
29738
1936
24146
25894
1923
1919
1916
1913
24135
24131
25885
14449
1895
1891
1886
14443
1875
25884
14442
1872
29735
14441
1861
14438
14434
1836
29734
29727
14430
14426
정규표현식 왜 서버는... 3
14425
1828
1813
29725
29719
1808
1804
14423
24120
25866
14420
25863
1784
1777
25859
14419
1775
29717
1768
1759
1744
14416
14414
14413
1737
14412
1718
1714
1704
1700
29714
1699
14411
1696
1686
1677
1672
1671
25853
1660
1654
1650
25851
25850
1647
1588
1586
1580
1567
14408
1553
24109
1551
25849
25848