![]() |
|||
|
|||
Creating An HTML Based Apollo Application
So after seeing just how darn good an HTML based Apollo application could be done, I wanted to see how I could build one as well.
Now I may be dumb - but I was surprised to find I couldn't use Flex Builder (by itself) to build an HTML based Apollo application. Flex Builder will only let you work with a Flex based Apollo application. You can't point the project to an HTML file.
On reflection I figure that is pretty obvious. I mean, it is Flex Builder, not HTML Builder, but I was still a bit surprised.
Luckily it isn't too hard. I had help from the Apollo Coders list. I don't know the guys name, but brodnack was his ID and I thank him for the help.
Let me be clear - I could be doing this completely wrong. But it worked for me.
So first off I created a super simple HTML file:
Hi, this is Raymond's first HTML apollo app.
And saved this to index.html in a new folder. Next I needed the XML file that Apollo uses to help define the application. I followed the format FlexBuilder used and named my index-app.xml. I got the XML from another FlexBuilder project. (I will probably make a simple snippet out of this for CFEclipse.) I edited a few of the entries in the XML:
appID - I set this to ApolloHTML
name - Ditto
description and publisher - I just typed something relevant for both
Lastly, I changed
<rootContent systemChrome="standard" transparent="false" visible="true">[SWF reference is generated]</rootContent>
to
<rootContent systemChrome="standard" transparent="false" visible="true">index.html</rootContent>
As you can see, I changed the value to point to my main application file.
So far so good. Now it's time for the command line tools. The first one I used was adl. This function lets you run your code as an Apollo app. All you have to do is point it at your XML file:
adl index-app.xml
So that was easy enough. I can now develop and just quickly run this command then to view the results. (And if I remember right, I can do this directly in Eclipse.)
Next - how do you build the AIR file so you can package your application up? One more command like - adt:
adt -package index.air index-app.xml index.html
The last argument can be a directory instead, which would have made sense if I had more files. This generated an AIR file I was then able to test with. I included the AIR on this post, but it's incredibly boring so don't bother downloading.
Comments
BLOG TALK 
Become a WebProNews blog partner.
Twitter Uncomfortable With 'Tweet' Being Used In Third Party AppsLooks like Twitter is not looking the other way as much these days. TechCrunch reports that there is some concern at the ...
Flickr Just Now Allowing Connectivity With Twitter
Hulu Receives Good News Concerning Their Online Ad Format
Global Gaming Factory Buys Up Pirate Bay


