1 Reply Latest reply on Aug 6, 2012 5:34 AM by Ned Murphy

    function ReleaseA() {

    Ron Colmen Level 2

      I can't seem to het the ReleaseA() working. Can someone help?

       

      var cuAct:Number=0;

      for (var asor:Number=1; asor<11; asor++) {

                this.iasor=asor;

                if(_root["asy"+asor].text!="") {

                          cuAct = cuAct+1;

                          _root.Accesso_summ.content_mc.acZ1.attachMovie("iconZ","iconZ_mc"+cuAct,_root.A ccesso_summ.content_mc.acZ1.getNextHighestDepth());

                          _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct].acZm_tx.text = _root["asy"+iasor].text;

                         _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct].acZm_mc = "http://www.myweb.com/images/pimage"+iasor+".jpg"

       

                          _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct]._x = xPosition2;

                          _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct]._y = yPosition2;

                          _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct].acZm_mc.onRelease = ReleaseA;

                          yPosition2 = yPosition2 + 18.7;

       

      }

      }

      function ReleaseA() {

      //      trace ("yes")

        _root.acc_prev_mc1._visible=true;

                loadMovie(this.acZm_mc, _root.acc_prev_mc1.acc_prev_mc2);

      }

        • 1. Re: function ReleaseA() {
          Ned Murphy Adobe Community Professional & MVP

          In your for loop you are doing two seemingly unrelated things with acZm_m.. First you are treating it like it is a String variable, then you are treating it lke it is a movieclip.  It cannot be both, and a String is not an interactive object.

           

              _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct].acZm_mc = "http://www.myweb.com/images/pimage"+iasor+".jpg"

              ...

              ...

              _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct].acZm_mc.onRelease = ReleaseA;

           

          one of those lines has to change.  The first is disallowing the second because it is redefining the object as a String.

          1 person found this helpful