Jump to content

help w/ actionscript? variables


Recommended Posts

hoping someone here can help me with actionscript.i dont know actionscript very well, how do i write a variable out in the orange part below...like in php i would have $i=0; and then write out myVar$i but I don't know how to do this with actionscript...the part I am talking about is highlighted in orange below.

 

 

 

var x=1;

while(x<20) {

 

 

var mc:MovieClip = this._parent.triangle1;

var myLV:LoadVars = new LoadVars();

myLV.onLoad = function() {

if (this.myVarx == '2225') {

var colorful = new Color(mc);

colorful.setRGB(0x003366);

}

else if (this.myVar(i) == '2226') {

var colorful = new Color(mc);

colorful.setRGB(0xed4d43);

}

else if (this.myVar3 == '2227') {

var colorful = new Color(mc);

colorful.setRGB(0x30b123);

}

else if (this.myVar3 == '2228') {

var colorful = new Color(mc);

colorful.setRGB(0xd4d20f);

}

else if (this.myVar3 == '2229') {

var colorful = new Color(mc);

colorful.setRGB(0xffdd22);

}

else if (this.myVar3 == '2230') {

var colorful = new Color(mc);

colorful.setRGB(0xcc0aca);

}

else if (this.myVar3 == '2231') {

var colorful = new Color(mc);

colorful.setRGB(0xff7ed9);

}

 

trace(this.myVar3);

};

x++;

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.