▶ test.fla에서 작업을 한다고 가정.

1. 버튼에 사용할 4개의 무비클립을 만를어 준다. (마우스 다운, 히트, 평상시, 오버)

사용자 삽입 이미지



















2. 라이브러리 창에서 조금전 생성한 무비클립선택이후 Linkage를 선택하여
Linkage를 아래와 같이 선택한 다음, 클래스 명을 위와 동일하게 바꿔준다.
사용자 삽입 이미지















3. MixButton.as 코딩
SimpleButton을 상속받은 MixButton 클래스를 코딩한다.


4. test.fla 코딩



변영하여 다양한 형태로 발전시켜주길 바랍니다. ㅋㅋ
초보의 손길이 묻어난 동적 버튼 생성이라 나름대로 풋풋하죠...;;
잘 봐주길..

'기타 > Old' 카테고리의 다른 글

스크립트를 통한 컴퓨터 재부팅하기  (0) 2008.05.02
Shape을 이용한 토글 버튼 만들기  (0) 2008.05.02
Flash Video Sample - Display Object  (0) 2008.04.30
Bitmap Filter 사용예시  (0) 2008.04.30
Bitmap 간단 사용 예시  (0) 2008.04.30

[Flash] http://wonsama.tistory.com/attachment/ek040000000001.swf


[Flash] http://wonsama.tistory.com/attachment/gk010000000002.swf



왠지 FMS(Flash Media Server)를 사용했을때보단 끈기는 듯한 느낌이 드네여 ;;
FMS사용했을땐 거의 로컬에서 재생한듯한 느낌 들던데...음...
뭔가 다른 것이 있나 ;;

'기타 > Old' 카테고리의 다른 글

Shape을 이용한 토글 버튼 만들기  (0) 2008.05.02
동적으로 버튼 만들기  (0) 2008.04.30
Bitmap Filter 사용예시  (0) 2008.04.30
Bitmap 간단 사용 예시  (0) 2008.04.30
Definition fl.controls:Button could not be found.  (0) 2008.04.28

'기타 > Old' 카테고리의 다른 글

동적으로 버튼 만들기  (0) 2008.04.30
Flash Video Sample - Display Object  (0) 2008.04.30
Bitmap 간단 사용 예시  (0) 2008.04.30
Definition fl.controls:Button could not be found.  (0) 2008.04.28
인터페이스 구현 예제  (0) 2008.04.25

[Flash] http://wonsama.tistory.com/attachment/fk100000000000.swf



[결과]
[object MainTimeline] : instance1
[object Stage] : root1
[object Stage] : root1
[object Stage] : instance1


'기타 > Old' 카테고리의 다른 글

Flash Video Sample - Display Object  (0) 2008.04.30
Bitmap Filter 사용예시  (0) 2008.04.30
Definition fl.controls:Button could not be found.  (0) 2008.04.28
인터페이스 구현 예제  (0) 2008.04.25
Factory 공법  (1) 2008.04.24
import fl.controls.Button;
var btn:Button = new Button();
this.addChild(btn);

이런 구문을 액션스크립트에서 작성한 다음 실행하면....

1172: Definition fl.controls:Button could not be found.

이런 에러가 발생하는 것을 볼 수 있다.

------------------------------------------------------------------------------------------------
해결 방법

컴포넌트 창을 열은 이후, 내 라이브러리로 드래그 한다음 실행하면 됩니다.
(드레그시 라이브러리에 Component Assets 폴더가 생성된 것을 볼 수 있음)

플래시에서는 컴포넌트라는게 swc라는 이름으로 이미 컴파일이 된 상태의 객체이며, 컴포넌트 같은 경우는 라이브러리에 올려둔 swc 내부의 객체들을 참조하기 때문에 swc가 없으면 아예 돌지 않습니다.

실제로 구현할 경우에는 해당 스킨을 커스터 마이즈 하여 사용합니다.
자세한 것은 플레시 컴포넌트 만들기를 참조.

'기타 > Old' 카테고리의 다른 글

Bitmap Filter 사용예시  (0) 2008.04.30
Bitmap 간단 사용 예시  (0) 2008.04.30
인터페이스 구현 예제  (0) 2008.04.25
Factory 공법  (1) 2008.04.24
[XOR 사용] 초간단 암호화 복호화  (0) 2008.04.24
------------------------------------------
Movable.as
------------------------------------------
package
{
 public interface Movable{
  function _start():void;
  function _pause():void;
  function _stop():void;  
 }
}
------------------------------------------
Plane.as
------------------------------------------
package{
 public class Plane implements Movable{
  public function _start():void{
   trace("plane_start");
  };
  public function _pause():void{
   trace("plane_pause");  
  };
  public function _stop():void{
   trace("plane_stop");
  };  
 }
}
------------------------------------------
Car.as
------------------------------------------
package{
 public class Car implements Movable{
  public function _start():void{
   trace("car_start");
  };
  public function _pause():void{
   trace("car_pause");  
  };
  public function _stop():void{
   trace("car_stop");
  };  
 }
}
------------------------------------------
test.fla
------------------------------------------
import Movable;
import Car;
var go1:Movable = new Car();
var go2:Movable = new Plane();
go1._start();
go2._start();
------------------------------------------
결과
------------------------------------------
car_start
plane_start
------------------------------------------
장점

var go1:Movable = getObject(); 로 구현하면...
go1._start(); 이런식으로 명명하였다면...

getObject()의 리턴값에 따라 _start()의 메소드가 비행기, 차의 오브젝트에 메소드가 될 수 있다.
그러므로 프로그래머 입장에서 볼때는 확장성이 그만큼 커진다고 볼 수 있다.


중요한 내용이므로 다시한번 봐야 할텐데... 맨날 뭐 절차적 코딩하다가 OOP형태의 프로그래밍 하려니깐 힘드네;;

'기타 > Old' 카테고리의 다른 글

Bitmap 간단 사용 예시  (0) 2008.04.30
Definition fl.controls:Button could not be found.  (0) 2008.04.28
Factory 공법  (1) 2008.04.24
[XOR 사용] 초간단 암호화 복호화  (0) 2008.04.24
GOP : Group of pictures  (0) 2008.04.23

============================================================
Test.as
============================================================
package{
 public class Test{
  protected var _myAge:int;
 
  public function getAge():Number{
   return _myAge;
  }
  public function setAge(m:Number):void{
   _myAge=m;
  }
  public function getTest2():Test2{
   return new Test2();
  }
 }
}


internal class Test2{
 internal var t2:int=3;
 public function getT2():int{
  return t2;
 }
}
============================================================
Test2.fla
============================================================
import Test;

var m:Test = new Test();

//var t2:Test2 = m.getTest2();     //주석 제거시 에러 발생

trace(m.getTest2().getT2());      // 에러가 발생하지 않는다.

============================================================
var t2:Test2 = m.getTest2();  에서 에러가 발생하는 이유

Test2는 internal 형으로 선언되었기 때문에 Test2.fla에서 Test2의 형태를 확인할 수 없다.

하지만 m.getTest2().getT2());  처럼 선언한 다음 바로 접근한 경우는

내부에서 접근한 형태이기 때문에 바로 사용이 가능하다

이처럼 사용하도록 만든 것이 바로 Factory 공법이다.
============================================================

 


결과 =====================================

원본 : 암호화 복호화 테스트 샘플 입니다.
암호화 : 씝혟혹
복호화 : 암호화 복호화 테스트 샘플 입니다.

주저리 ===================================
- 역시 초간단 ;;
- 암호화 되었을때  씝혟혹 옆에 표현할 수 없는 다른 문자가 포함되었다는 것에 유의 ㅋㅋ

'기타 > Old' 카테고리의 다른 글

인터페이스 구현 예제  (0) 2008.04.25
Factory 공법  (1) 2008.04.24
GOP : Group of pictures  (0) 2008.04.23
W카운터 소드 (adjet.js) 들여다 보기  (0) 2008.04.18
함수에서 여러가지 값을 입력받기  (0) 2008.04.18

In MPEG encoding, a group of pictures, or GOP, specifies the order in which intra-frames and inter frames are arranged.

The GOP is a group of successive pictures within an MPEG-coded video stream. Each MPEG-coded video stream consists of successive GOPs. From the MPEG pictures contained in it the visible frames are generated.

A GOP can contain the following picture types:

  • I-picture or I-frame (intra coded picture) reference picture, corresponds to a fixed image and is independent of other picture types. Each GOP begins with this type of picture.
  • P-picture or P-frame (predictive coded picture) contains motion-compensated difference information from the preceding I- or P-frame.
  • B-picture or B-frame (bidirectionally predictive coded picture) contains difference information from the preceding and following I- or P-frame within a GOP.
  • D-picture or D-frame (DC direct coded picture) serves the fast advance.

A GOP always begins with an I-frame. Afterwards several P-frames follow, in each case with some frames distance. In the remaining gaps are B-frames. With the next I-frame a new GOP begins.

The GOP structure is often referred by two numbers, for example M=3, N=12. The first one tells the distance between two anchor frames (I or P). The second one tells the distance between two full images (I-frames), it is the GOP length. For the above example, the GOP structure is IBBPBBPBBPBB. Instead of the M parameter one can use the maximal count of B-frames between two consecutive anchor frames.

The more I-frames the MPEG stream has, the more it is editable. However, having more I-frames increases the stream size. In order to save bandwidth and disk space, videos prepared for internet broadcast often have only one I-frame per GOP.

The I-frames contain the full image, they don't require any additional information to reconstruct the image. Therefore any errors in the streams are corrected by the next I-frame (an error in the I-frame propagates until the next I-frame). Errors in the P-frames propagate until the next anchor frame (I or P). B-frames do not propagate errors.


출처 : http://en.wikipedia.org/wiki/Group_of_pictures

'기타 > Old' 카테고리의 다른 글

Factory 공법  (1) 2008.04.24
[XOR 사용] 초간단 암호화 복호화  (0) 2008.04.24
W카운터 소드 (adjet.js) 들여다 보기  (0) 2008.04.18
함수에서 여러가지 값을 입력받기  (0) 2008.04.18
get set : 오버라이드를 해보자  (0) 2008.04.18

사용자 삽입 이미지

원소스는 띄어쓰기가 되어있지 않았다 ㅜㅜ 그래서 코드 보면서 띄어쓰기 ㄱㄱ ;;
심심한 분들은 분석하여 쓰기 바랍니다. ㅡ,.ㅡ/

'기타 > Old' 카테고리의 다른 글

[XOR 사용] 초간단 암호화 복호화  (0) 2008.04.24
GOP : Group of pictures  (0) 2008.04.23
함수에서 여러가지 값을 입력받기  (0) 2008.04.18
get set : 오버라이드를 해보자  (0) 2008.04.18
if문에서 활용안.  (0) 2008.04.17

+ Recent posts