Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default array question help

    i am new to arrays and have practiced some tutorials for instance aligning information in rows and columns then categorizing them numerically, alphabetically, etc...

    however, can i put multiple mcs in an array and just call the array in function. i have long code like this that could be shortened...

    //// notice how all mcs do the same thing
    //// however it is not practical for this animation to create one big mc

    axis_mc.next_btn.onRelease = function () {
    globe_mc.onEnterFrame = this.myOnEnterFrame7;
    axis_mc.onEnterFrame = this.myOnEnterFrame8;
    mouseover_text.onEnterFrame = this.myOnEnterFrame9;
    beta_btn_mc.enabled = false;
    }

    axis_mc.next_btn.myOnEnterFrame7 = function () {
    this._alpha -= 6;
    if (this._alpha <= 1) {
    delete this.onEnterFrame;
    gotoAndPlay (4);
    }
    }

    axis_mc.next_btn.myOnEnterFrame8 = function () {
    this._alpha -= 6;
    if (this._alpha <= 1) {
    delete this.onEnterFrame;
    gotoAndPlay (4);
    }
    }

    axis_mc.next_btn.myOnEnterFrame9 = function () {
    this._alpha -= 6;
    if (this._alpha <= 1) {
    delete this.onEnterFrame;
    gotoAndPlay (4);
    }
    }


    duppdawg webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. 2-Dimensional Array Question
      This is my first time using an array. 1. My code seems to work but I need to return a count from each piece of the array (the number of each...
    2. Array question
      hi, this is a piece of code from a program. ---- my $size; my $realPath; my @filterArray; open READFILTEREDLIST,'</tmp/FILTEREDLIST' or die...
    3. simple array question?
      On 12-Aug-2003, "Randell D." <you.can.email.me.at.randelld@yahoo.com> wrote: http://www.php.net/manual/en/function.list.php -- Tom...
    4. array question (grep -v on array)
      Hi, I have an output of errors fed into an array, after which I only look at things I care about and put them in a different array: ...
    5. [PHP] ARRAY QUESTION
      Dale Hersh <mailto:dalehersh@hotmail.com> on Thursday, July 24, 2003 12:41 PM said: unset($myStuff);
  3. #2

    Default Re:array question help

    you can do it this way:

    myClips = [globe_mc, axis_mc, mouseover_text];

    axis_mc.next_btn.onRelease = function () {
    for (var i in myClips)
    myClips.onEnterFrame = this.myOnEnterFrame;

    beta_btn_mc.enabled = false;
    }

    axis_mc.next_btn.myOnEnterFrame = function () {
    this._alpha -= 6;
    if (this._alpha <= 1) {
    delete this.onEnterFrame;
    gotoAndPlay (4);
    }
    }



    juankpro webforumsuser@macromedia.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139