Saturday, 26 July 2008

Using External actionscript files.

This tutorial will teach you how to use an external actionscript files with Actionscript 2.0. External actionscript files are used to separate the code from the actual Flash interface. This is useful as it helps to unclutters the work area and allows you to work with multiple scripts at the same time, if necessary.

To get an external Actionscript file to work, you need to first link it to the flash document. This only requires one simple line of code which is:

#include "youractionscriptfile.as"

This line of code includes your external actionscript file into your flash document.


External actionscript files.

Step 1

Open a new Actionscript file and save the file name as test.as. You could use whatever name you wish.


Step 2

Now open up a new Flash document.
On the timeline insert a new layer called "actions". Select the first frame and then right click and select actions.




Step 3

And add the following line of code:

#include "test.as"

You should now be able to use external actionscript files.

0 comments:

  COPYRIGHT © 2014 · ILIKE2FLASH · Theme by Ourblogtemplates

Back to TOP