-
1. Re: Why is MouseEvent not a compile-time constant?
kglad Mar 28, 2011 8:36 AM (in response to jl2000)whenever you see a message like that it means you need to import that class (just like you imported the movieclip class). (or, you made a typo and there is no such class.)
if you don't know how to import that class, check that class in the help files and, at the top, it will show how it should be imported:
import flash.events.MouseEvent
-
2. Re: Why is MouseEvent not a compile-time constant?
jl2000 Mar 28, 2011 9:57 AM (in response to kglad)Kglad - import MouseEvent class!
That was exactly the issue.
I falsely thought that the MouseEvent class was already imported - by virtue of the display.MovieClip being imported or by the movie clip instance itself.
I'm working in CSS4. The tutorial I referred to is about CS5. Is it possible that importing MouseEvent is not a requirement in CS5?
JL
-
3. Re: Why is MouseEvent not a compile-time constant?
kglad Mar 28, 2011 10:25 AM (in response to jl2000)no, it's required no matter what cs version you use.
the only place you don't need to explicitly import classes is if you write code on a timeline. but it's better practice to use class files.
timeline coding is better for simple projects/testing code.
-
4. Re: Why is MouseEvent not a compile-time constant?
jl2000 Mar 28, 2011 11:51 AM (in response to kglad)Thanks for the follow up.
-
5. Re: Why is MouseEvent not a compile-time constant?
kglad Mar 28, 2011 3:31 PM (in response to jl2000)you're welcome.



