Importing Action Script 3 files
Copy link to clipboard
Copied
Hey guys I wrote a very simple actionscript 3 file outside of a ActionScript 3.0 project in Flash CS5.5, I'm trying to figure out how can I import my as3 file. So how can I do that?
Copy link to clipboard
Copied
It depends partly on what you actually wrote and what you really mean when you say you want to import it.
Did you create a class file or is it just a file with alot of AS3 code in it?
In what way do you mean you want to import it?
Copy link to clipboard
Copied
Well I wanted to import a small as3 file similar to importing art assets .
Copy link to clipboard
Copied
I have never heard of importing AS3 code into the library such as you might do with art assets. To physically have the AS3 code in the file you would need to copy it from the file it is currently in and paste it into the Actions panel while a frame of the timeline is selected in the Flash file.
There is an import command that you can use but that will not add the code into the file until you publish the file.
Copy link to clipboard
Copied
Okay I didn't know, I'm new to flash. So how can I make a script in the actions panel?
Copy link to clipboard
Copied
To add the code to into the file, first create a layer in the timeline and label it "Actions" or something that tells you the code will be in that layer. Then select the first frame (if that is the frame you want it to be in) while the Actions panel is opened. Once you have selected the frame, any code you type/copy into the Actions panel will apply to that frame, and potentially all other frames down the timeline from it (depends on the code you enter... some code only applies to that frame, such as a stop() command or an event listener assignment)

