AS3 problem
- Started
- Last post
- 12 Responses
- CyBrain
I think I'm having a classpath issue
Here is a screen shot of my error (below) and how I set up my class in Flash preferences/Actionscript/Actions... 3.0 settings:
Here's where I put the installed files on my drive:
and here is the script line that is causing the error: Tweener.addTween(getChildAt(i), {x:Math.random()*(maxXMove*getCh... y:Math.random()*(maxYMove*getChi... time:Math.random()*1, rotation:Math.random()*20, transition:"easeOutElastic"});
Did I do something wrong here? I'm using Flash CS3 publishing for 9/AS3.
Thanks in advance.
- jsaul0
post ur code
- Autokern0
add import Tweener;
at the beginning of your code.If you are coding using the document class
You need to import the classes you need before starting writing down the class.if you are coding on the timeline (old skool as2 way), you still need to import the non native flash classes.
- jsaul0
yeah, what kern said:
import caurina.transitions.Tweener;
- CyBrain0
Sorry, I should have included that.
import caurina.transitions;
import caurina.transitions.Tweener;
import gs.TweenMax;
import gs.easing.*;I think that second line is redundant, but none of this is making much sense.
- acescence0
well it is based on ecmascript, like javascript, so it's not like they just pulled it out of their collective ass. ecmascript borrows heavily from others as well, C, Java, Python, so there are similarities across all of them.
- chrisRG0
and once you get into AS3 you won't look back on AS2, for sure!
- designasaurus0
Yeah, AS3 is far better than AS2, you just have to learn it.
Try to stay more organized with your file paths, it will help you. Really you should be working from once source directory with all your FLA files, and classes should be in a com folder.
ex: import com.caurina.transitions.Tweener.Get the book Essential Actionscipt 3.0 and read the first few chapters.
- CyBrain0
Finally got it to work by putting it in
Adobe Flash CS3/Actionscript/Configuration/A... 3.0/Classes/caurinaThen using the line: import caurina.*;
And setting the classpath again. Macintosh HD:Applications:Adobe Flash CS3:Configuration:ActionScript 3.0:Classes:caurina
That only took me several hours.
- CyBrain0
Nah, I take all that back I had a line commented out. When I uncommented it I get the same error as before. Thanks for everyone's help. I don't see this situation getting fixed. I'll let others deal with it.