[카테고리:] Flash

  • SWF and FLV File Format Specification (Version 9)

    어도비에서 플래시 플레이어 9 버전의 SWF 및 FLV 파일 포멧 스펙을 공개했습니다. 이 스펙을 토대로 SWF 파일을 생성하는 소프트웨어 등을 개발할 수 있습니다. 이거 잘 이용하면 AS3과 바이트어레이로 SWF를 분석, 가공, 생성하는 것이 가능할지도…

    http://www.adobe.com/licensing/developer/

    ps. 스펙도 공개되었고 하니 조만간 플래시 9용 디컴파일러도 나오겠네요.

  • New features in AS3 Array class

    Some methods newly added to Array calss in AS3 will save time to code “for” loops.
    Adobe should have introduced them earlier…
    AS3의 Array 클래스에 새로운 메소드들이 등장하면서 for 루프 돌리는 일이 많이 줄어들 것 같네요 ^^
    더 빨리 나왔어야 했는데…

    every(callback:Function, thisObject:* = null):Boolean
    Executes a test function on each item in the array until an item is reached that returns false for the specified function.

    some(callback:Function, thisObject:* = null):Boolean
    Executes a test function on each item in the array until an item is reached that returns true.

    filter(callback:Function, thisObject:* = null):Array
    Executes a test function on each item in the array and constructs a new array for all items that return true for the specified function.

    forEach(callback:Function, thisObject:* = null):void
    Executes a function on each item in the array.

    indexOf(searchElement:*, fromIndex:int = 0):int
    Searches for an item in an array by using strict equality (===) and returns the index position of the item.

    lastIndexOf(searchElement:*, fromIndex:int = 0x7fffffff):int
    Searches for an item in an array, working backward from the last item, and returns the index position of the matching item using strict equality (===).

    quote from ActionScript 3.0 Language and Components Reference

  • use “as” to avoid type mis-match error

    for(var i:uint=0; i
    
    This code causes the type mis-match error at compile, because getChildAt() method returns a DisplayObject.
    위 코드는 컴파일 시에 다음과 같은 타입 미스매치 에러를 냅니다. 왜냐하면 getChildAt()메소드는 DisplayObject 객체를 리턴하기 때문이죠.

    1118: Implicit coercion of a value with static type flash.display:DisplayObject to a possibly unrelated type flash.display:MovieClip.

    To avoid the compile error, you can cast the returned value as MovieClip like this.
    이러한 컴파일 에러를 회피하기 위해 다음과 같이 리턴된 값을 MovieClip로 캐스팅합니다.
    var mc:MovieClip = MovieClip(getChildAt(i));
    You can also use "as".
    또는 "as"를 사용할 수 있습니다.
    var mc:MovieClip = getChildAt(i) as MovieClip;
  • GIF Encoder/Decoder by Thibault Imbert

    Thibault Imbert made it…
    He build a GIF Encoder and a GIF Decoder, and unveils them on bytearray.org.

    AS3 GIF Animation Encoding Class 0.1

    AS3 GIF Player Class 0.1