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

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

· 13년 전 · 1233 · 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개

감사합니다~~

게시글 목록

번호 제목
12487
12486
380
12484
12483
376
12482
12481
12479
12478
12477
12476
12475
12474
12473
12472
12471
12470
12469
371
12468
12467
12466
12465
12464