I’m having a little problem with Action Script 3.0.
I’m basically trying to add ‘PaddleTwo’ to the stage at a certain x, y location, yet I keep getting the error shown, and I’m not quite sure why.
Also, I can’t figure out why the code functions I’ve defined in the ‘PaddleTwo’ class won’t run from the Main class, I’ve imported the ‘PaddleTwo’ class and added the sprite to the stage.
Anyway help would be much appreciated.
P.s. I’m not very good with programming, but I need to get this done
Capitalization matters in ActionScript – your constructor needs to be called PaddleTwo, not paddleTwo. Also, it needs to be a Constructor, not a method. I forget how AS3 does Constructors, but I don’t think it’s the same as methods.
Glossing way over it, a constructor is basically a method that’s the same name of the class and is automatically called when an object of that particular class is being created.
Really the only major difference you need to worry about is that constructors are used when creating an object and methods are used to do work with objects