I tried to copy one of your examples, this one in particular:
var target:Line = new Line(500,0,500,98.5);
target.draw();
var squares:Array = new Array();
for (var i:Number = 0; i<50; i++) {
var x:Number = Math.random() 300;
var w:Number = Math.random() 300;
var myRectangle:Rectangle = new Rectangle(0, i2, 100, 1);
myRectangle.setRegistrationPoint({x:0, y:0});
myRectangle.lineStyle();
myRectangle.draw();
myRectangle.movieclip._xscale = w;
squares[i] = myRectangle.movieclip;
}
var myScale:Scale = new Scale(squares);
myScale.setOptimizationMode(true);
myScale.animationStyle(6000,Bounce.easeOut);
myScale.run(500,squares[0]._yscale);
But it reports a syntax error with these lines:
var x:Number = Math.random() 300;
var w:Number = Math.random() 300;
I corrected the error by doing this:
var x:Number = Math.random(300);
var w:Number = Math.random(300);
But now only one line is animated, not the 50 so lines.
What obvious problem am I missing :)
Thanks for the help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to copy one of your examples, this one in particular:
var target:Line = new Line(500,0,500,98.5);
target.draw();
var squares:Array = new Array();
for (var i:Number = 0; i<50; i++) {
var x:Number = Math.random() 300;
var w:Number = Math.random() 300;
var myRectangle:Rectangle = new Rectangle(0, i2, 100, 1);
myRectangle.setRegistrationPoint({x:0, y:0});
myRectangle.lineStyle();
myRectangle.draw();
myRectangle.movieclip._xscale = w;
squares[i] = myRectangle.movieclip;
}
var myScale:Scale = new Scale(squares);
myScale.setOptimizationMode(true);
myScale.animationStyle(6000,Bounce.easeOut);
myScale.run(500,squares[0]._yscale);
But it reports a syntax error with these lines:
var x:Number = Math.random() 300;
var w:Number = Math.random() 300;
I corrected the error by doing this:
var x:Number = Math.random(300);
var w:Number = Math.random(300);
But now only one line is animated, not the 50 so lines.
What obvious problem am I missing :)
Thanks for the help
Hey Alex,
your assumed correction is wrong. It's
var x:Number = Math.random() * 300;
var w:Number = Math.random() * 300;
My documentation tool did not output the mulitplication character. (I should have encoded it, but didn't)
Best,
Alex
Excellent thanks alot :)
Works perfectly.
Alex