A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: [RESOLVED] Learning Functions

  1. #1
    Rainy Day Member eightamrock's Avatar
    Join Date
    Jun 2003
    Neshanic Station NJ

    [RESOLVED] Learning Functions

    Hey Guys,

    I have just begun to learn how to use functions as they have eluded me in the past.

    I have done some searching on the topicbut I have yet to find anything that explains what I am doing wrong.

    The setup:
    Flash 8 File
    2 Layers
    1 Movie Clip

    In the top layer I have this code:

    function fade(whichclip){
    a = whichclip._alpha;
    whichclip._alpha = Math.round(a-5);
    whichclip._alpha = 0;

    I have the movie clip on the second layer with this A.S. on it:


    this._alpha = 100;


    The instance name of the clip is box. Why will it not fade? I assume I am using the wrong syntax or some fashion of code that cant be used in a function I just have no idea what it is.

    Can Anyone Help Me?

    // All of the above code now works. Its all in the targeting. _root is inherited in the function script from the call in the MC.
    Last edited by eightamrock; 05-11-2006 at 11:22 PM. Reason: SOLVED!
    "Shhhhh I have insomnia and Im trying to sleep it off."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center