본문 바로가기

프로그래밍/ActionScript

(15)
유용한 액션스크립트 라이브러리 20개 원문 http://www.weberdesignlabs.com/blog/?p=38 TweenLite - 가장 빠른 트위닝 엔진 - 테스트 결과. AS3와 AS2 모두 지원하며 용량이 3K밖에 안됨. TweenFilterLite 필터 트위닝을 위한 엔진. Papervision3D - 간단한 큐브같은 도형부터 복잡한 3d모델과 재질까지 지원하는 3D엔진. 가장 유명한 플래시 3D엔진이며 아직 베타버전이지만 실제로 사용된 많은 사례가 존재한다. Away3D - 또다른 플래시 3D엔진. 페이퍼비젼보단 인기가 덜하지만 정식릴리즈 되어있다. 그리고 페이퍼비전 코드를 토대로 만들어진 엔진이다. 데모보기 WOW Engine - AS3 3D 물리엔진. Papervision3D나 Away3D와 같이 사용하면 금상첨화. FI..
JPEGEncoderAsync //JPG encoding private function resizeFile( argBitmap : Bitmap ) :void { var resizeScale : Number = 1; var tempBitmap : Bitmap = argBitmap; if( 1.33 * this.getFileSizeAtKByte( this.fileRef.size ) > ( this.maxFileSize / 1024 ) ) { resizeScale = Number( ( this.maxFileSize / ( this.fileRef.size * 1.33 ) ).toFixed( 2 ) ); tempBitmap.scaleX = tempBitmap.scaleY = resizeScale; tempBitmap.smoothing = tr..
BMPDecoder bmp파일을 외부 로딩하는데 유용하게 쓰일수 있다. var fileRef:FileReference = new FileReference( ); fileRef.load( ); var file:ByteArray = new ByteArray( ); fileRef.data.readBytes( file ); //이미지 byteArray 생성 var bmpDecoder : BMPDecoder = new BMPDecoder(); var tempBitmap : Bitmap = new Bitmap(); tempBitmap.bitmapData = bmpDecoder.decode( file ); // byteArray BitmapData 로 디코딩
참조/복사 원시데이타( Number,Boolean,String) 타입의 대입은 복사 나머지 객체의 대입은 모두 참조
addFrameScipt( frame Number , handler ) 해당 무비클립의 지정된 프레임에 지정된 핸들러 지정할수 있다. 지정된 프레임에 있던 기존 코드는 무시된다. frame Number 는 ( 0 부터 시작 ) ex) 해당 무비 클립 10 프레임에 액션을 추가하고자 할때 exMc.addFrameScript( 9 , onFrameAction ); function onFrameAction() : void { ....... }
Using Vectors in ActionScript 3 and Flash Player 10 One of the new ActionScript features included in the Flash Player 10 Public Beta is the inclusion of a Vector class. Essentially, the Vector class is a typed Array, and in addition to ensuring your collection is type safe, can also provide (sometimes significant) performance improvements over using an Array. Using the Vector class is pretty simple, and very similar to using an Array. In fact, th..
ActionScript 3.0 optimization techniques by Joa Ebert