Skip to content

Instantly share code, notes, and snippets.

@timoxley
Created February 10, 2010 04:41
Show Gist options
  • Save timoxley/300033 to your computer and use it in GitHub Desktop.
Save timoxley/300033 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
minWidth="1024"
minHeight="768"
creationComplete="application1_creationCompleteHandler(event)">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function application1_creationCompleteHandler(event:FlexEvent):void {
// This is the correct test!
var minimum:Number = -(Number.MAX_VALUE);
var value:Number = 0;
if (value < minimum) {
result.text =
"value: " + value + " < minimum: " + minimum + "?!"
} else {
result.text =
"value: " + value + " >! minimum: " + minimum + " :)"
}
}
]]>
</fx:Script>
<s:Label id="result" verticalCenter="0" horizontalCenter="0">
</s:Label>
</s:Application>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment