home
faq
how to
sitemap
contact
 
 

How to create a starter skeleton project
in Adobe flash using ActionScript 3.0.

part II

 
 
A basic tutorial for importing images, and
adding objects to an Adobe flash file.
 
(page 1)
 
January 4, 2009
 
   
page 1, page 2, page 3, page 4, page 5  
   

In part I of this tutorial we created a skeleton project in Adobe's flash authoring tool, and added a script, of type ActionScript 3.0, and tested the flash movie file output.

Here we will import a couple of image files, convert them into symbols, and add some code to manipulate the objects.

There are a couple of paths to take to accomplish this, and each method is similar. One method will allow you to control a symbol (MovieClip, Sprite, etc.) that is placed onto the stage via the authoring tool, but without the need to create an actionscript file that defines it. While the other method will allow you to control a symbol via a script file, although, the symbol itself may not be placed on the stage. The script file is written in a language defined by ActionScript 3.0 (resembling C++), and it describes the symbol's control with a Class structure that contains member variables and member functions.

The following are outlines of the two possible methods:

(Method I)

To control a symbol placed on the stage
without an ActionScript Class definition:

1) import image to the library

3) drag image onto stage

4) right-click on the image on stage >> convert to symbol

5) set symbol properties:
         Name: same as class name
        (no actionscript settings to set) 

6) fill in: <Instance Name>
          >> in properties box, with a scripting variable name
       
(a variable name with which to control it)

 

(Method II)

To control a symbol, not initially appearing on the stage,
with an ActionScript Class definition:

1) import image to the library

2) create a script file for this new Class, using its class name
    (for example: Test_Object_1 can be a class name)

3) drag image onto stage (this will allow conversion to a symbol)

4) right-click on the image on the stage >> convert to symbol

5) set the symbol's properties:
         Name: same as class name
(as defined in the script file)
         class name: same as class name
         set linkage to: Export for ActionScript
                              Import for Runtime Sharing

3) delete image from the stage

The rest of this article describes the above two methods in
more detail
.

 

continued on page 2

 

page 1, page 2, page 3, page 4, page 5

 
   
dark maelstrom icon dark maelstrom
flash games
  t-shirt icon dark maelstrom
t-shirt designs

  purple bitcoin icon 1NempEdpogR6XB6QUky9wAd7HjaAy9M5ts  
 
   
   
   

back

home