One last thing with RANDOM!

here is my final code:

onClipEvent (load) {
speed = Math.random()*3;
}
onClipEvent (enterFrame) {
this._x += speed;
if (this.hitTest(_root.reset)) {
this._x = -300;
speed = Math.random()*3
this._y = Math.random()*76
this._alpha = Math.random()*45
this.xscale = Math.random()100
this.yscale = this.xscale
1.765
}
}

everything works fine EXCEPT the random scalling… any hints??? oh and I have the last line times 1.765 in order to keep proportion of the randomly scaled MC. Please help.
Peace

PS I tried using this too:

mySize=Math.random()100
this.xscale=mySize
this.yscale=mySize
1.765

Thanks

Try…


onClipEvent (load) {
speed = Math.random()*3;
}
onClipEvent (enterFrame) {
this._x += speed;
if (this.hitTest(_root.reset)) {
this._x = -300;
speed = Math.random()*3;
this._y = Math.random()*76;
this._alpha = Math.random()*45;
this._xscale = Math.random()*100;
this._yscale = this._xscale*1.765;
}
}


You forgot to add the _ in front of xscale and yscale

You could also use _width and _height instead of _xscale and _yscale. They do the same thing.

I just caught that!!! ha, its the little things that get you… is height in pixels? or %… thank for all your help!

It is in Pixels.

I hate little coding errors that can make or break your code. One friggin’ symbol is all it takes.