hi guys, so i have question
why cant the variable “height” modify the position of y? =S im new at ac so i dont know if an element of an array can be a variable? and how do i make it a variable?
this is a par of the code im writing to make a group of movieclips appear offstage in a random positions as long as it is offstage (i know the array is not random since i give the values of each element but i tried by putting [COLOR=Red]y= math.random * number?.[/COLOR]… but in the coordinates i didnt knew how to specify that it could be any random number exept the lenght of the stage)
[COLOR=Red]
onClipEvent (load) {
myArray = new Array ();
myArray[0]=-100;
myArray[1]= 0;
myArray[2]=100;
myArray[3]=200;
myArray[4]=300;
variable= Math.random () * 4;
myArray2= myArray.slice (variable,variable+1);
Height = myArray2
trace (Height)
trace (this._y)
this._x = 200;
this._y = Height;
}[/COLOR]
i really apreciate any help u guys can give me
peace out