mikefrederick Posted February 26, 2008 Share Posted February 26, 2008 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 https://forums.phpfreaks.com/topic/93048-help-w-actionscript-variables/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.