Converting AS3 projects to Apollo
April 11th, 2007Yesterday I received a comment from Ian Stokes. He was asking for the easiest way to convert an existing AS3 project into Apollo Application, this is indeed something a lot of people are missing in Apollo examples so I wrote this short step-by-step tutorial that should clear things out.
Using Flex Builder 2:
- File > New > Apollo Project
- Select “Basic”, click “Next”
- Enter project name (and location if needed), click “Finish”
- Using the navigator panel (Window > Project Navigator) delete the “[your_apollo_name].mxml” and “[your_apollo_name]-app.xml” file from the newly created Apollo project.
- Using the navigator panel select the contents of an existing AS3 project and select copy from the right click menu, and paste them into Apollo project folder
- Confirm any overwrites in the popup dialog.
- Right click on the “[your_application_name].as” file that was pasted into Apollo project folder, and select “Set as Default Application”.
- In the popup window – enter the requested meta information, and click “Finish”. A new file “[your_aplication_name]-app.xml” has been created.
- Run the Apollo application
That’s it, hope it made things a bit more clear! And if you have any interesting questions, feel free to shoot them into the comments section anywhere in the site.
Digg this if you found it useful.

April 11th, 2007 at 2:53 pm
[...] Read More Support PSP Flash Development Learn more… [...]
April 11th, 2007 at 5:48 pm
Thanks a lot for writing this article.
Cheers
Ian
April 12th, 2007 at 5:26 pm
[...] read more… [...]
April 16th, 2007 at 4:56 pm
Hi,
I was finding something similar like this.
I have a flex project completely built and I want to convert the same into Apollo.
Do I follow the same procedure as for action script project or is there something more that I have to do in order to make my flex project running in Apollo.
Thanks in advance.
April 16th, 2007 at 5:01 pm
Rahul,
You would have to follow the same procedure as for AS project, the only difference is that you have to set your main *.mxml file (and not *.as) as a default application file.
Hope that helps, If you will have any further issues post them here.
Cheers
Paulius Uza
April 16th, 2007 at 5:12 pm
Thanks a lot Uza, You made by day. Apollo indeed is pretty cool.
April 17th, 2007 at 7:50 am
Hi Uza,
Yesterdays after yesterdays tip , I got into another issue.I have 4 flex projects,which run independently.Now, I have one more project, which is the main menu and uses swf loader to load the corresponding 4 projects.
Now I have to convert all of this into apollo. Any idea how I can go thru with this?
April 17th, 2007 at 12:01 pm
Hey Rahul,
All you have to do is to convert the loader menu into Apollo application, and copy the 4 projects you are loading into the Apollo application dir.
/
- /PR1
- /PR2
- /PR3
- /PR4
- Loader Application.as
When exporting to deployable *.air file, include the PR folders into your project by selecting them in the popup window.
After installation your PR1 folder will be accessible under app-resource:/PR1 .
app-resource:/ points to root directory of the installed application (the directory that contains the application.xml file for the installed application)
Hope that will help you!
Cheers
April 18th, 2007 at 8:35 am
Thanks Uza. I will check it out and let you know.
April 18th, 2007 at 11:02 am
Hi Uza,
Was trying to implement your tips, and a very funny error evoked.My application gives a call to a webservice which populates the data. Now, as soon as the service is fired, I get the following error:
Error: Could not find resource bundle formatters
at mx.resources::ResourceBundle$/getResourceBundle()
at mx.formatters::DateBase$cinit()
at global$init()
at mx.formatters::DateFormatter/format()
at VM_proj_ver10/gridFormatDT()
at mx.controls.dataGridClasses::DataGridColumn/itemToLabel()
at mx.controls.dataGridClasses::DataGridBase/mx.controls.dataGridClasses:DataGridBase::makeListData()
at mx.controls.dataGridClasses::DataGridBase/mx.controls.dataGridClasses:DataGridBase::makeRowsAndColumns()
at mx.controls::DataGrid/mx.controls:DataGrid::makeRowsAndColumns()
at mx.controls.listClasses::ListBase/mx.controls.listClasses:ListBase::updateDisplayList()
at mx.controls::DataGrid/mx.controls:DataGrid::updateDisplayList()
at mx.core::UIComponent/validateDisplayList()
at mx.managers::LayoutManager/::validateDisplayList()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()
I tried to import the following
mx.resources.ResourceBundle;
mx.formatters.DateBase;
But still the result is same.
One more fact I want to share is that I am using Date Formatter in my application, which my suspect is the problem area.
If I run the same application without using swfLoader, then it works absolutely fine.
Any idea about this??
Thanks in advance.
May 10th, 2007 at 10:46 pm
Rahul,
I have been having the same problem, and I just figured out a way around it. The problem occurred when I tried to use the DateFormatter within a SWF file that was loaded through the SWFLoader. My solution involves cross-scripting, which isn’t a problem if the loading SWF file and the loaded SWF file are on the same domain. What I did was I instantiated an instance of the DateFormatter class in the top level/loading SWF file. Then, from the loaded/child SWF file I used the already instantiated DateFormatter by calling Application.application.date_formatter (where date_formatter is the name of the variable that contains the DateFormatter instantiation). This solved the problem for me.
Hopefully this will help someone else out as well, as I have spent hours trying to figure this out.
May 10th, 2007 at 11:05 pm
Thanks for your comment Natiupiru, I hope it will be useful to other readers.
August 31st, 2007 at 2:48 pm
Yonas I’m afraid you misunderstood something here. We are talking about Adobe AIR (former codename Apollo) in this blog post.
August 31st, 2007 at 3:18 pm
Apologies, I am out here.
October 23rd, 2007 at 7:18 pm
[...] read more | digg story [...]
December 15th, 2007 at 1:46 pm
very interesting, but I don’t agree with you
Idetrorce
April 5th, 2008 at 6:36 pm
http://all-decadron.info/index.html decadron