Problems with "/ ' +

I’m having problems with this line:

""+i+".thex" = random(800);

it just doesnt work. I want “i” to be a variable number. But I don’t really know how to work with “+ i +”, maybe somebody could tell me something about the use of ", +, / and '.

Associative array referencing:


i don;t really get it yet. i want a duplicated mc to get his thex from _root.mc1 (or _root.mc2). Here is my code in frame 1:

amount = 5;
while (amount>1) {
	duplicateMovieClip(, "mc"+i, i);
	setProperty("mc"+i, _y, i*20);
	_root["mc"+i].thex = random(800);
	setProperty("mc"+i, _alpha, random(100));

and this is the code for the mc:

onClipEvent (load) {
	thex = _root.thex;
	speed = 4;	
onClipEvent (enterFrame) {
	x = thex - _x
	_x += x/speed;