If you need speed or fancy font effects, use a bitmap font instead. That is a font that has its glyphs
rendered to a texture atlas. To use it, first register the font with the method registerBitmapFont, and
then pass the font name to the corresponding property of the text field.
flatten屬性:開啟了flatten,可在播放動畫時更加的順暢,但所有之後對畫面的alpha、rotation和位置的
改變都無法在畫面上被呈現。
Sprite一個專門用來放許多其他元件的標準容器,它可被偵聽下面這些事件
Event.ADDED: the object was added to a parent.
Event.ADDED_TO_STAGE: the object was added to a parent that is connected to the stage, thus becoming visible
now.
Event.REMOVED: the object was removed from a parent.
Event.REMOVED_FROM_STAGE: the object was removed from a parent that is connected to the stage, thus
becoming invisible now.
KeyboardEvent.KEY_DOWN: 當按下按鍵時觸發
KeyboardEvent.KEY_UP: 當離開按鍵時觸發
EnterFrameEvent.ENTER_FRAME: 影格前進時觸發事件,根據frameRate的設定來決定一秒觸發幾次
Event.FLATTEN: 當開啟或關閉flatten功能時會觸發事件
A Quad represents a rectangle with a uniform color or a
color gradient.
每一個端點都可以設定一個顏色,會呈現線性漸層。
要顯示一個線性的漸變色,需要把一個色值設置給
頂點0和頂點1,然後另一個顏色給頂點2和頂點3。
頂點位置是這樣安排的: