Prev | Current Page 716 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

parseInt(el.text);
if(v != null & & v > = min & & v < = max)
{
return v;
} else {
el.text = Std.string(alt);
return alt;
}
}
private function getAngle(el : TextBox, alt : Int) : Float
{
var v = getInt(el, alt, -180, 180);
return v/180*Math.PI;
}
private function clear(e)
{
flash.Lib.current.graphics.clear();
}
}
The result is shown in Figure 13 - 6 .
Part II: Server Side, JavaScript, and Flash: Oh My!
384
Conclusions
The proposed implementation covers only the Flash 9 platform. All the classes that are Flash - specific are
limited to a unique package. Writing the connection layer between another platform, say Flash 8 or
JavaScript, and the UI API is just a matter of creating a new specific package on the same line as the
existing one.
About being lightweight, the Tree Editor example is around 12.6KB, a quite good result after all
considering that in Flex introducing just a single button will produce a file of around 115KB. The
confrontation with Flex is unfair because of the very different level of features implemented and API
richness, but sometimes being light is as important as being rich.


Pages:
704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728