Okay, I know my question might sound a little ‘n00b’ to most people here but well, I hope people here will be able to help this little n00bie here.
I have discover a few things about ActionScript which I don’t understand is this…
When we want to declare a temporary variable, we use…
var varname;
but sometimes, when we wants to have a variable that will remains thru out the life of the movie, we just use it like…
varname = “stringvalue”;
and now this one is the one that i dun understand…
varname = object();
varname.onKeyDown = function() {
trace(“test”);
}
Why does varname has to be equals to an object? And when do I use this one? And What is this actually? How come it is usually followed by an event and then a function in such a way? I thought a function could be something like…
function funcname($arguement) {
trace(“test”);
}
Are there any differences in these two functions? And what does the first function mean actually?
Thanks a lot…