Skip navigation
Currently Being Moderated

function ReleaseA() {

Aug 6, 2012 4:28 AM

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","ico nZ_mc"+cuAct,_root.Accesso_summ.content_mc.acZ1.getNextHighestDepth()) ;

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

                   _root.Accesso_summ.content_mc.acZ1["iconZ_mc"+cuAct].acZm_m c = "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_m c.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);

}

 
Replies
  • Currently Being Moderated
    Aug 6, 2012 5:34 AM   in reply to Ron Colmen

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points