Thursday, March 15, 2007
Apollo Browser in five lines of code
The sample Apollo MXML code:
<?xml version="1.0" encoding="utf-8"?>
<!--line one. I am not goign to count the XML PI-->
<mx:ApolloApplication mx="http://www.adobe.com/2006/mxml" layout="vertical" cornerRadius="12">
<!-- line two -->
<mx:Text text="Enter URL and hit enter" fontFamily="Arial" fontSize="16" fontWeight="bold" />
<!-- line three-->
<mx:TextInput id="urlTxt" width="100%" enter="html.location=urlTxt.text;" text="http://www.adobe.com" />
<!--line four -->
<mx:HTML id="html" width="100%" height="100%" location="http://www.adobe.com">
<!--line five. Not really a line of code, just closing the root tag -->
</mx:HTML>
</mx:ApolloApplication>
Here is the screenshot of the Apollo browser application:

mx:HTML could be done on one line not two... and this is HTML, so you can of course do it all on one line :)
Links to this post:
<< Home







