Skip to content

Instantly share code, notes, and snippets.

View hernanBeiza's full-sized avatar
😎

Hernán Beiza hernanBeiza

😎
View GitHub Profile
@hernanBeiza
hernanBeiza / Main.as
Created December 30, 2014 15:52
AS3 - Map
private function map(value:Number, low1:Number, high1:Number, low2:Number = 0, high2:Number = 1):Number {
//El valor, valor min del original, valor máx del original, valor min, valor max
//myBox.x = map(mouseX, 0, 550, 100, 200);v
//http://lab.joelgillman.com/archives/87_map-function
//if the value and the 1st range low are equal to
// the new value must be low2
if (value == low1){
return low2;
}
@hernanBeiza
hernanBeiza / Main.as
Created December 30, 2014 15:52
AS3 - Listar Propiedades Objeto
var description:XML = describeType(miObjeto);
trace(description);