actionscript 3 - As3 Errors 1046 type not found if I specify a document class -


In my AS3 code using Flash CS3, everything works fine without any document class I use and they work, but once I attach a document class, I receive this error: 1046: The type was not found or was not compiled at a compile-time: KeyboardEvent.

Can anyone explain why this happens? This is what my document class looks like:

  package {import flash.display.Sprite; Import flash.events.Event; Import Flash. Import flash.events.TimerEvent; Import Flash.Display.MovieClip; Import flash.geom.Point; Import flash.geom.Matrix Import Flash.U.board; Import Flash. Events CabardAvents; Import Flash. Events Import Flash.events.KeyboardEvent; Import flash.events.MouseEvent; Public class extends myCoolClass MovieClip {}}  

But again, I get more errors, I get: 1180: Call the SoundTransform, possibly undefined method . .

Do I have to add more import to get it properly?

Thanks

Yes - you have to import all the classes When you write the code on the timeline in the flash, but when you use the sections, which you obviously need to import all the referenced sections, a bunch of classes is fully imported.

A good IDE should do this for you (like press Ctrl + Shift + I in - I'm pretty sure, and there is such functionality too)


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -