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
Posted in actionscript, flash | No Comments »
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 ...
Posted in Uncategorized, actionscript, flash | No Comments »
Saturday, May 30th, 2009
var field:TextField = createField( );
function createField():TextField{
return TextField;
}
Posted in Uncategorized | No Comments »
Saturday, May 30th, 2009
在KEITH PETERS 的書中讀到
用陣列來排列Z軸
Posted in actionscript, flash | No Comments »
Thursday, August 28th, 2008
在PV3D中要存取物件的寬 跟高似乎不能直接用 XXX.height
看了一下,要寫成
plane.extra = {width: mm.width, height: mm.height};
plane.y = plane.extra.height*0.5;
此外,要改變PV3D中參考點的方法好像沒有~
倒是再網路上看到有人用了一些小撇步
http://kabulinteractive.com/blog/?p=21
http://labs.boulevart.be/index.php/category/papervision/
http://analogdesign.ch/blog/index.php/archive/papervision3d-demo-move-pivot-axis-only/
Posted in flash | No Comments »
Thursday, August 28th, 2008
今天有空黨的時候寫了一下PV3D,複習一下以MC為MATERIAL的狀況下按鈕的BUTTONMODE功能
到目前為止似乎只能夠以viewport.button = true 來控制是否要出現小手指。
變成每個mc material中的按鈕都要有mouseover, mouseout 的 function 來切換是否出現小手指。
否則小手指只要只到該PV3D物體,即使沒碰到MATERIAL中的按鈕元件,也會出現小手指。
有點煩~~~~~
ㄚ我還不知道MV MATERIAL中要怎麼讓按鈕有_UP _DOWN _OVER等不同狀態的顯示。
Posted in flash | No Comments »
Friday, June 27th, 2008
這兩天作的一個案子讓我發現as3的滑鼠事件真是機車.
明明指市click卻會接著丟出roll out.
請參考ticore老大的這篇文章;
還有絲路的討論串也可以看看喔;
Posted in flash, tutorial, 本土設計師 | No Comments »