views:

814

answers:

1

Hello, I'm quite new at flex and have been following a game tutorial. I've created a class named Bounce (Bounce.as) but when I try to compile, I get the above error. I've been searching forums and help, but the only people who seem to get this error is with HTTPServer. How can I specify to actionscript 3.0 that I want to use a created class (Bounce) instead of a mx class (mx.effects.easing:Bounce)? How would I formulate that?

public function startup():void
{
     lastFrame = new Date();
     new Bounce().startupBounce();
}

Thanks for any help or pointer.

A: 

Hey, I would've edited the question, but I wasn't registered when I posted it so I can't. I'm basically importing mx.core.*

Is that the problem? I'm not in front of the code right now, but is there a way to simply point flex (actionscript) at the right class (as you would using mx.effects.easing:Bounce)? It would make it so easier. On another note, the adobe help is unorganized, so I've been having trouble finding the answer there (how to point flex to your own classes). Thanks for the fast reply.

Socapex_2K
Ok, well I figured it out, my bad. Basically, I hadn't realized that flexbuilder automatically added the import mx.effects.easing.Bounce at the beginning of the file... Removing that was all that was needed.
Socapex_2K
Great! I figured it looked like an import problem, because I've coded many classes with the same names as built-in classes and I've never had a problem
Cameron
And I guess if I was using the same class as one in mx.core.*, I could just remove the asterix and import all needed classes individually... or simply rename my class, hehe. Only 2 days with flex and I'm starting to get the feel of it :)
Socapex_2K