开发者

Add Com library to Flash CS5.5

开发者 https://www.devze.com 2023-04-02 04:06 出处:网络
I was watching some tutorial, and there trainer imported com.greensock.TweenLite I downloaded the greensock pacakge but can\'t figure out how, where to add this files so that when in AS3.0 i type imp

I was watching some tutorial, and there trainer imported com.greensock.TweenLite

I downloaded the greensock pacakge but can't figure out how, where to add this files so that when in AS3.0 i type import com.gre... it pops-up.

Any ide开发者_如何学Goas?


create a source directory anywhere you'd like to keep your own personal library and other 3rd party libraries. for example, i put everything in a folder /Developer on my mac:

Add Com library to Flash CS5.5

from within Flash Professional CS5.5, select Preferences > Category: ActionScript > Language: ActionScript 3.0 Settings...

Add Com library to Flash CS5.5

here, under Source Path, you will choose the folder on your file system that contains your source files. when this is done, code completion should work with these files.

there are other ways to choose specific source paths for specific projects, but the steps i've outlined above is a global approach that only needs to be done once and will insure that the source files in your chosen directory will be accessible to all projects.


You need to add the folder containing the com folder. So if you have TweenLite source in a directory like this:

C:\Flash\libs\TweenLite\com\greensock

Then you would need to add the following class path to Flash:

C:\Flash\libs\TweenLite\

Here is how to add a path to your classpaths in Flash: LiveDocs: Set the classpath for ActionScript 3.0


Just place the com folder in the root of your project. Like so:

Add Com library to Flash CS5.5

Now you can access all classes in the greensock package. Just import them in your document-class:

Add Com library to Flash CS5.5

Here's an example using tweenlite to animate an object on the stage to alpha 1.

0

精彩评论

暂无评论...
验证码 换一张
取 消