Archive for the ‘actionscript’ Category

PV3D: BasicView- Camera Type

Tuesday, July 7th, 2009

PV3d 中的BasicView 中 CAMERA可以有這幾種,其中TARGET是預設的。 DEBUG : String = "Debug" [static] The DEBUG constant defines a DebugCamera3D FREE : String = "Free" [static] The FREE constant defines a Camera3D with no target SPRING : String = "Spring" [static] TARGET : String = "Target" [static] The TARGET constant defines a Camera3D targeting x:0, y:0, z:0

AS: Array.sort

Sunday, May 31st, 2009

這是在keith peters的advanced as3 amimation 中讀到的關於array.sort()的用法 在這邊做個筆記以免忘記 假設今天有個array _items, 用來儲存3d物件 private function sortItems():void { _items.sort(depthSort); for(var i:int = 0; i < _items.length; i++) { _holder.addChildAt(_items[i] as Sprite, i); } } private function depthSort(objA:DisplayObject, objB:DisplayObject):int { var posA:Vector3D = objA.transform.matrix3D.position; posA = _holder.transform.matrix3D.deltaTransformVector(posA); var posB:Vector3D = objB.transform.matrix3D.position; posB = _holder.transform.matrix3D.deltaTransformVector(posB); return posB.z - posA.z; } you can create your own custom function to do the sorting. If you create ...

AS: FLASH 3D DEPTH SORTING

Saturday, May 30th, 2009

在KEITH PETERS 的書中讀到 用陣列來排列Z軸

Good Resoures on Genie Effect in Flash as

Wednesday, April 8th, 2009

http://lab.ultravisual.co.uk/ http://stephan.acidcats.nl/blog/2007/08/28/macs-genie-effect-in-flash/ http://www.flashandmath.com/intermediate/gummy/index.html

[flash] [筆記] 表示root是一個GETTER方法

Monday, March 16th, 2009

在使用describeType(root)時: 表示root是一個GETTER方法,而傳回的型別是DisplayObject。 DisplayObject並沒有"自定變數"的宣告。所以在編譯時root.自定變數  會發生錯誤。 然而使用root["自定變數"]時,由於編譯程式裡不會檢查,所以不會發生錯誤。