actionscript 3 - AS3: How can I use TweenMax in a different package -


so i'm trying build separate package. in package reference tweenmax, i'm having trouble linking (error definition com.greensock:tweenmax not found).

here dir structure:

myapp --com  ----greensock ------tweenmax etc  ----mypackage ------packageclass.as --------elements ----------elementclass.as (this 1 trying access tweenmax)  --src ----main.as 

main.as document class, can test mypackage. doesn't except instantiate mypackageclass , stick in displaylist.

in elementclass.as have: import com.greensock.tweenmax;

which flashdevelop seems see within ide, when compile ...could not found error.

so how can reference tweenmax elementclass file (i have src , com dirs in classpaths. i'm using flashdevelop flash player 11.7 , flex 4.6.0 sdk.

am going wrong?

i'm going ask obvious question, did import greensock folder?

import com.greensock.tweenmax 

ok let's did already. maybe need tell code libraries are. go file > actionscript settings, or, on stage's property panel, click wrench icon next script drop down menu.

you should see dialog 3 tabs, first 2 of labeled source path , library path. forget third.

in source path tab, should @ least have dot - (.) - 1 of choices. tells flash actionscript classes can't find @ compile time in same directory source fla. there can list number of other library paths contain supporting files.

the second tab swc files. if have swc library, can tell fla find pathing here, pathed libraries in source path tab.

the images below presume there folder, in same directory source fla, named library. in folder sub folders named src , swc. inside src sub folders containing greensock , facebookapi com folders, (the latter used here example). inside swc folder there swc named exampleswc.swc.

the paths shown in pics below allow fla see following imports:

import com.greensock.tweenmax; import com.facebook.somefacebookapiclass; import com.somepackageintheswc.someclassfromexampleswc; 

enter image description here

enter image description here


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -