flash on 2012-4-28
♥0 |
Line 28 |
Modified 2012-04-28 04:53:16 |
MIT License
archived:2017-03-20 15:18:50
ActionScript3 source code
/**
* Copyright jokehn9 ( http://wonderfl.net/user/jokehn9 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/bG8B
*/
package {
import flash.display.Sprite;
import flash.display.Graphics
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var xs:Array = [0,200,0,200]
var ys:Array = [ 0, 0, 200, 200]
var ix:int;
var iy:int = 0;
graphics.lineStyle(1,0x0000ff)
for(ix = 0; ix< 100; ix ++) {
graphics.moveTo(100+xs[0],100+ys[0])
graphics.lineTo(100+xs[1],100+ys[1])
graphics.lineTo(100+xs[3],100+ys[3])
graphics.lineTo(100+xs[2],100+ys[2])
graphics.lineTo(100+xs[0],100+ys[0])
xs[0] = (xs[2] + xs[0]*9 )/10
xs[1] = (xs[0] + xs[1]*9 )/10
xs[2] = (xs[3] + xs[2]*9 )/10
xs[3] = (xs[1] + xs[3]*9 )/10
ys[0] = (ys[2] + ys[0]*9 )/10
ys[1] = (ys[0] + ys[1]*9 )/10
ys[2] = (ys[3] + ys[2]*9 )/10
ys[3] = (ys[1] + ys[3]*9 )/10
}
}
}
}