Actionscript Classpath Problem
- Started
- Last post
- 7 Responses
- CyBrain
I'm new to AS3, but still am amazed how troublesome setting a classpath is. I'm using Flash CS4 and I'm trying to set up Caurina Tweener.
I got this class "tweener_1_31_74_as3.zip" from this page: http://code.google.com/p/tweener…
and here is a click-through of three screen shots that show where I put them, how I set the class path and the output of god-forsaken errors that basically tell me it isn't even there.
http://www.talesfromthehead.com/…
Any help would hugely be appreciated. Thanks in advance.
- mikotondria30
wouldnt you add:
Applications/AdobeFlashcs4/
under the swf-address path there ? then it just goes straight from that into /caurina/ etc... ?
I wouldn't bet that the problem would be solved by powercycling :/
- mikotondria30
or !!...sorry - remove 'caurina' from the class path in the 'source path' panel, else it will be looking in caurina/caurina, which doesnt exist...
- CyBrain0
Well, I have fewer errors now, but it still seems like Flash is totally confused by any term from Caurina:
**Error** Scene 1, Layer 'as', Frame 3, Line 9: 1046: Type was not found or was not a compile-time constant: Tween.
var main1rollOverTween:Tween = new Tween(main1_txt, "x", Elastic.easeOut, 0, 300, 3, true);**Error** Scene 1, Layer 'as', Frame 3, Line 9: 1180: Call to a possibly undefined method Tween.
var main1rollOverTween:Tween = new Tween(main1_txt, "x", Elastic.easeOut, 0, 300, 3, true);**Error** Scene 1, Layer 'as', Frame 3, Line 9: 1120: Access of undefined property Elastic.
var main1rollOverTween:Tween = new Tween(main1_txt, "x", Elastic.easeOut, 0, 300, 3, true);Total ActionScript Errors: 3, Reported Errors: 3
- kumori040
Yeah, thats right.
In your import statement, the first directory CANNOT be included in your source path. Your source path must be the directory BEFORE that, e.g., your source path should be "Applications/Adobe Flash CS4/classes"
- kumori040
Tweener is a static class, meaning it doesn't take instance variables. So you cannot create a new variable called "main1rollOverTween". When you want to create new tween, you say:
Tweener.addTween(object, props,...);
- maximillion_0
'Tween' isnt a class of the Tweener package. Tween is part of 'mx.transitions.Tween' so use that import statement if you want to use it. otherwise use as kumori04 puts it
- CyBrain0
thanks for all the help. It seems the more I learn anything about AS3, the worse of I am. I have it working now.