Learn: Flash Filters & ActionScript

Home • Members Tutorials Forum iSnapChat Contact Us 


Flash Tutorials


Creating Filters with ActionScript


Free Flash Tutorial

Step 3    <<   Previous      Intro   1   2   3   4   5     Next   >>      


Step Three: The ActionScript

  1. If the Timeline is closed, open it: Window > Timeline (Ctrl Alt T)
  2. Rename Layer 1 to: Rectangle MC
  3. Insert a new Layer:
  4. Name the Layer: ActionScript
  5. Select Frame 1 of the Actionscript Layer: Frame 1

  6. Frame 1 of the ActionScript Layer is selected.

  7. Open the Actions Panel: Window > Actions (F9)
  8. If Script Assist is on, Switch it off:
  9. Note: With Script Assist on you cannot type in the Actions Panel. If you want to learn more about Script Assist see the tutorial on the Actions Panel

  10. Type the following into the Actions Panel (further explanation is given in the next section):
  11. // Makes the filter available to use in the Movie.
    import flash.filters.GlowFilter;

    // Creates a variable with info about the Glow Filter settings
    var myGlowFilter = new GlowFilter (0xff00ff,1,25,25,2,3,false,false);

    // Applies the filter to the object named myMovieClip
    myMovieClip.filters = [myGlowFilter];

  12. Test your Movie: Test > Movie (Ctrl Enter)
  13. You should see something like this:

    The Glow Filter is applied to the rectangle.

  14. Close the Test Window:


Step 3    <<   Previous      Intro   1   2   3   4   5     Next   >>      

16506 visitors to this page since March 07 •

Phil Schulz's Facebook Profile
Webwasp is Phil Schulz's baby. You are welcome to contact me or become my Facebook friend: Click here

 Top of Page HomeMembers Tutorials Forum iSnapChat Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.