algebra - Me = flash headache
algebra - Me = flash headache
Out of context: Reply #5
- Started
- Last post
- 10 Responses
- kumori040
//Don't allow object past 50, or 300.
var minX:Number = 50;
var maxX:Number = 300;myObject._x = Math.max(minX, Math.min(_xmouse, maxX));
So, the _x value of myObject will stop at minX, or become higher unless maxX is reached. I haven't tested, but that should work.