|
-
Flash Incompetent
help with classes...
So i've created a class, which as I have learned requires an external flash file and a command like:
is there anyway to have the as file embedded into the fla so it doesnt need to call an external as file from the same directory? or if that isnt possible can it be called from anywhere on the internet like the following:
Code:
import http://www.blanksite/testing/Class1.as;
-
All Actionscript files are all embedded into the SWF when the swf is compiled - once you have created the swf you don't need to - in fact, can't - load the AS file from an external directory...
K.
-
All 1s and 0s
Hi,
Firstly, when you import a class, you don't use the '.as' extension. It should look like this:
code:
import Class1;
Secondly, as deadbeat says, once you have published your movie, the class becomes embedded in the .swf file. This means that you only need the class files before you publish your movie. After it is published, the movie will work fine without the .as file.
Hope this helps.
"If I have seen further, it is by standing on the shoulders of giants." - Sir Isaac Newton
-
Bearded (M|G)od
really, you dont even need to use import class1 if you set the classpath to your classes folder, itll automatically do it. say you have a folder called 'project' where all your files are at. and inside that folder, you haev a folder called 'classes' which holds all your .as files, just set the classpath to .\classes and youll be good to go.
[ps]you can set the classpath is under publish settings. click on as2.0 settings.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|