I am sorry for posting such a question, but I have just started using Flash (CS5) and I can't seem to get a basic trace to work.
Here is the code:
package {
public class Main {
public function Main() {
trace("Hello");
}
}
}
I have created a new FLA file and saved it in a folder, then I listed Main as the actionscript file that should be linked to the flash file, I also put them in the same folder but when I do (Control -> Test movie -> Test) all i see is a white background without any text on it. Im not sure whats the problem here, is it something to do with including libraries or is there something wrong with the way the script is linked to the flash file.
Thanks in advance.
Your main class, in this case called
Main
, needs to extend fromflas.display.Sprite
. Try changing your class to something like this: