# Newbie Question

**URL:** <https://forum.kirupa.com/t/newbie-question/92611>\
**Category:** Uncategorized\
**Created:** [October 19, 2003, 4:42pm UTC](https://forum.kirupa.com/t/newbie-question/92611 "2003-10-19T16:42:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xEnOn](https://avatars.discourse-cdn.com/v4/letter/x/85e7bf/32.png) [@xEnOn](https://forum.kirupa.com/u/xEnOn)\
**Post date:** [October 19, 2003, 4:42pm UTC](https://forum.kirupa.com/t/newbie-question/92611/1 "2003-10-19T16:42:47Z")

</div>

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. :nerd:  
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… 🙂
