views:

433

answers:

3

I'm currently maintaining some flex code and noticed very many functions which are declared like:

private function exampleFunc():void {
    ....
}

These functions are in the global scope, and aren't part of any specific class, so it's a bit unclear to me what effect declaring them as private would have. What restrictions does the "private" qualifier have for functions like this?

A: 

What do you mean by global scope? Are these functions declared in the main MXML file?

In general, private means that functions can only be called from within the class that declares them.

Christophe Herreman
+2  A: 
mmattax
A: 

But, when you put it in a actionscript file .as is it still compliled into a class ?

Because asdoc doesn't like it.