trace() in ActionScript 3.0

In AS2, trace() accepted only one parameter. But, in AS3, trace accept one or more parameters.
AS2에서는 trace()에 하나의 파라메터만 입력 할 수 있었지만,
AS3에서는 여러 개의 파라메터를 보낼 수 있게 바뀌었네요.

public function trace(… arguments):void

Parameters
… arguments — One or more (comma separated) expressions to evaluate. For multiple expressions, a space is inserted between each expression in the output.

quote from ActionScript 3.0 Language and Components Reference

When you execute this code
trace(”a”, “b”, “c”, “d”);
a string separated by space will be printed.
a b c d
trace(”a”, “b”, “c”, “d”);
를 실행하면
a b c d
와 같이 ” ” (공백문자)로 구분된 문자열이 출력되는 군요.

지우고 까는데 한시간 훌쩍…

이거 뭐 윈도우를 다시 까는 것도 아니고…
지우고 새로 까는데 한 시간이 더 걸리는 듯 하네요 ㅠㅠ
삭제 시작하고, 밥먹고 왔는데도 계속 삭제중 OTL

Creative Suite 3 is now available!

4월 16일, 미국에선 어도비 CS3 제품들의 판매가 시작되었네요.
아직 트라이얼 버전 다운로드는 안되고 있지만, 몇 일내에 공개될 것으로 기대 됩니다.
조만간 볼 수 있을 것 같네요…

cs3.jpg

Adobe Photoshop CS3 and Flagship Creative Applications Also Available

Use “is” instead of “instanceof”

is와 instanceof 연산자는 주어진 객체가 특정한 데이터 타입인지를 판별하기 위해 사용됩니다.

is 연산자는 어떤 오브젝트가 특정한 데이터 타입, 클래스 또는 인터페이스와 일치하는지 판별합니다.
반면, instanceof 연산자는 어떤 표현식의 프로토타입 체인이 특정한 함수의 프로토타입 오브젝트를 포함하는지 판별합니다. (쓰면서도 뭔 말인지 잘 이해는 안됨 ㅠㅠ)
어쨌든 어떤 객체가 어떤 클래스에 속하는지 아닌지를 알고자 할 때 사용할 수 있습니다.

그러나 instanceof는 인터페이스를 인식하지 못하기 때문에 is를 사용하는 것이 더 좋을것 같네요.
게다가 컴파일 시에도 instanceof대신 is를 사용하라고 태클을 걸어오고요.

1
2
3
4
5
6
7
8
9
10
11
12
import flash.display.*;
import flash.events.IEventDispatcher;
 
var mySprite:Sprite = new Sprite();
 
trace(mySprite is Sprite); // true
trace(mySprite is DisplayObject); // true
trace(mySprite is IEventDispatcher); // true
 
trace(mySprite instanceof Sprite); // true
trace(mySprite instanceof DisplayObject); // true
trace(mySprite instanceof IEventDispatcher); // false

Flash Player 9.0.45.0 released

A New version of Flash Player for Flash CS3 contents is released.
AS3 components and Runtime Shared Libraries do not work correctly in prior version.

There will be player version problems deploying SWFs created with CS3 for a while.
Should I not use components??

Flash CS3 컨텐츠를 위한 Flash Player의 새 버전이 나왔네요.
구버전의 Flash Player에서는 AS3 컴퍼넌트나 런타임 공유 라이브러리(Runtime Shared Libraries) 등의 일부 기능이 제대로 동작하지 않습니다.

당분간 CS3로 제작된 SWF를 배포할 때 플레이어 버전 문제가 발생할 가능성이 있군요.
컴퍼넌트도 쓰면 안된단 얘긴가??

Fixes and improvements in Flash Player 9.0.45.0: Support for Creative Suite 3

  • New ActionScript 3.0 components for Flash CS3 Professional do not function correctly in versions prior to Flash Player 9.0.45.0.
  • Runtime Shared Libraries (RSLs) exported for ActionScript 3.0 generate a runtime security error. (195395)
  • Display objects instantiated by the playhead entering a frame because of a gotoAndStop command (or similar action) incorrectly process actions on frame one. (189490)
  • flash.text.TextField.getCharBoundaries returns a rectangle that is offset to the left by 2 pixels for fields that are created using the Flash CS3 Professional text tool. (193249)
You can check the version of Flash Player installed on your machine at the following link.
아래 사이트에서 현재 사용중인 Flash Player의 버전을 확인할 수 있습니다.

Version test for Adobe Flash Player

thanks to Uza’s Blog & More

Older Posts »