Hello …
Im trying to understand alittle more about using external files.
In my flash actionscript window i basicly want to access a function that i wish to put in an external .as file … but i just cant seem to get it…
like:
myFunction();
in external file
function myFunction() {
trace("test");
}
I’v been trying some code but it dont work very well…
(myClass.as)
package {
public class myClass{
public function myClass() {
trace("test");
}
}
}
and in my flash file the only way for it to trace was if i wrote:
var test:myClass = new myClass();
But i dont get it … how can i access the function form wherever i want … so i basicly can type myClass() and it traces again … i dont wanna create variables to run the functions … i hope you understand and i hope/suppose its probably very basic…
I prolly got it all wrong… i’v tryd to figure out if i can/should access it with import instead… but dident get that to work either…