當Director運行記憶體不足時,它會卸載一些閑置的演員cast member.Director可以定義這個卸載的優先順序。但這優先順序的定義也很詭異。分為: 3—Normal Sets the selected cast members to be removed from memory after any priority 2 cast members areremoved.2—Next Sets the selected cast members to be among the
director,lingo中. mousedown的repeat中貌似每次都需要有足夠的等待時間,否則會很難響應。下面repeat中的首句put刪除以後,3d情境的響應效率反而會非常低下。 疑問! on mouseDown me p_lastdownH = the mouseH p_angle = 0 repeat while the mousedown put the mouseh _angle = (the mouseH - p_lastdownH).float *
C++中&有兩種含義: 1)、取地址,例如:int* p = &a; 2)、引用,例如:int& b = a。取地址時,&是一個一元運算子,返回的是運算元存放在記憶體中的起始位置(對於32位作業系統,是一個8位的十六進位數);引用時,它實際上就是被引用的變數,使用的是同一段記憶體位址內的資料,只是重新賦予了一個名字。在2)的例中,無論是b++還是a++,a和b兩個值都會發生變化。對a和b取地址,會發現它們完全一樣,&a ==
id = getNetText("http://www.baidu.com/")--getNetByteArray("http://www.baidu.com") put getStreamStatus(id)put netTextResult(id) -_- -------------------------------------------------------------------------------- NetLingo----------------------------
用verbose文法賦值Lingo中的邏輯運算子使用的是單等號"=",編碼中使用形如set param to valueput value into param的verbose文法進行賦值較為清晰。 關心case-insensitive由於大小寫不敏感case-insensitive,要注意字串的比較。put "A" = "a" -- 1 關心case-sensitiveLingo絕大部分時候是大小不敏感的。只有一種情況,就是property list的property用字串時,大小寫是敏感的。
Lingo中使用getVariable(varName, flag)得到AS3中的某class內部的static變數。flag的意思是get Value or Ref。False,表示ref;true為value。實際上,對基元類型,即使寫false也得到的是value。如果得到的是引用reference,那麼修改引用就可以修改as中該 變數的值。比如,如果p_array是as中的一個array,那麼p_array[2]=300確實會改變as中的array。對基元類型,就只能使用另外兩種方式:f
太激動人心了,終於看到一個章節叫做The Lingo Core。讓我們再來看看這激動人心的字句:In order for the server to use Lingo, it must be accompanied by Lingo VM Xtra, located in the server's Xtra folder. The Lingo VM Xtra contains Lingo's core engine. The core is a subset of Lingo as a