Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Importing Action Script 3 files

New Here ,
Jul 19, 2013 Jul 19, 2013

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?

TOPICS
ActionScript
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2013 Jul 19, 2013

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2013 Jul 19, 2013

Well I wanted to import a small as3 file similar to importing art assets .

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 19, 2013 Jul 19, 2013

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 19, 2013 Jul 19, 2013

Okay I didn't know, I'm new to flash. So how can I make a script in the actions panel?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 22, 2013 Jul 22, 2013
LATEST

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines