AS3: Importing classes/Sharing variables between classes
问题 Ok, this is my problem: i have a variable in a class named Mirror public var line:Sprite = new Sprite(); i want to use that variable in another class named MovieClip. I imported the class in the MovieClip class: public class MovieClips extends MovieClip { import Mirror; public function MovieClips(radius:int, _x:int, _y:int,size:int,span:int,addl:Array) {.... but when i try to do something like this: if (Mirror.line.hitTestObject(ball) == true) { speedY *= -1; } It shows up like an error: