2014-01-08 56 views
1

我對AS3非常非常新,並且嘗試編輯一些模板。我得到這個消息... 有人可以幫助我一步一步做什麼?就像我說的,我很新,需要一步一步來。1046:未找到類型或不是編譯時常量錯誤

Scene 1, Layer 'Layer 2', Frame 1, Line 10 1046: Type was not found or was not a compile-time constant: Event. 

Scene 1, Layer 'Layer 2', Frame 1, Line 23 1046: Type was not found or was not a compile-time constant: MouseEvent. 

Scene 1, Layer 'Layer 2', Frame 1, Line 28 1046: Type was not found or was not a compile-time constant: MouseEvent. 

Scene 1, Layer 'Layer 2', Frame 1, Line 33 1046: Type was not found or was not a compile-time constant: MouseEvent. 

Scene 1, Layer 'Layer 2', Frame 1, Line 38 1046: Type was not found or was not a compile-time constant: MouseEvent. 

回答

5

類的youre指在代碼中不會導入。

import flash.events.Event; 
import flash.events.MouseEvent; 
1

您需要導入這些類,然後才能使用它們(見Curtis Morley's post我的詳細信息)

以下內容添加到您的文檔的頂部:

import flash.events.* 
相關問題