flash on 2010-11-10
/**
* Copyright brandons ( http://wonderfl.net/user/brandons )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/fOwv
*/
package {
import com.bit101.components.Label;
import com.bit101.components.IndicatorLight;
import flash.display.Sprite;
import flash.geom.Point;
public class Main extends Sprite {
public function Main() {
// write as3 code here..
var lb:Label = new Label(this,10,10,"test");
var i1:IndicatorLight = new IndicatorLight(this,100,87,0xff0000,"(100,87)");
i1.flash();
var i2:IndicatorLight = new IndicatorLight(this,156,320,0x0033FF,"(156,320)");
i2.flash();
lb.text = String(Point.distance(new Point(100,87),new Point(156,320)))
graphics.lineStyle(1)
graphics.moveTo(100+5,87+5)
graphics.lineTo(156+5,320+5)
}
}
}