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:

Optimisation :
ReplyDeletemx:HTML could be done on one line not two... and this is HTML, so you can of course do it all on one line :)
Yeah - I had it like this in Flex Builder but if you cut and paste MXML to blogger then do an "edit HTML" view and switch back to the preview, Blogger reformats the elements. I caught the others but not this one when I commented it.
ReplyDeleteAnd of course you don't absolutely need the instructional text label... bringing the count down to 4. (You could always place the instructional text as a "prompt" text within the text input ... that is, text="Ener URL Here and select enter" click="urlTxt.text = ''")
ReplyDeleteand some doubted it could be done.
ReplyDeletehehehe
/d
This comment has been removed by a blog administrator.
ReplyDelete