The source code to my PostACard app is now online. You can find it HERE.
The source code isn’t especially beautiful, but there are a bunch of nice features in there. One thing in particular that I think other people could learn from is the way I load the configuration file for the application. You can check it out starting in the preinit handler in Main.mxml. This method is a good way to prolong the appearance of the loading screen while additional data is loaded.
So check it out, and feel free to leave a comment if you have any thoughts or questions
Also, for those of you who have been asking about the results of the 360|Flex API contest, well the organizers of 360|Flex have just announced that they are extending the voting period of the competition for another 35 days! It was originally supposed to be only 3 days.
I have to say that I am very disappointed by this. The other entrants and I put a lot of time and effort into our entries, and there were some significant prizes up for grabs. I am very grateful to everyone who took the time to vote for PostACard, and hopefully more people will continue to do so over the next month. Hopefully the organizers will be a little bit more professional in a months time.
No Flash for the iPhone »« Xobni Invites Available – Only 30, be quick!
another cool stuff! I like it
What’s the license?
Thanks for asking
All code on this site is free for anyone to copy or use as they wish.
Hej,
Awesome application, ill defiantly be using this to send photos from my flickr account to friends a family. I’m not sure if this is a bug but it seems that when you send a postcard it doesn’t remove focus from components on top of the picture before taking a snapshot of the card causing the resize handlers to be present in the postcard.
/Eric
Thanks Eric
What you describe would definatly be a bug, but it doesn’t happen for me. It should like a timing issue or something.
I’m not going to be making any changes to the application for a while, but I do think I will build a version 2.0 someday. When I do I’ll be sure to look into it.
-Tony
good work.
Seems like the globals.xml is missing from the zip file.
yes, Flex Builder is prompt me an error with globals.xml missing.
How call I fix it ?
Okay, I figure out the purpose of globals.xml is for
– Flickr Developer ID
– paths for preloaded images
But what’s its exact format ? Any suggestions ?
lt;?xml version=”1.0″ encoding=”utf-8″?gt;
lt;datagt;
lt;global name=”flickrAPIKey” value=”3418d1a4dbcce36191c7b7860b83081c” /gt;
lt;/datagt;
Sorry guys. I’m in a different time zone, so I only got your questions now.
The globals XML file is a place where I store variables which might change depending on where the SWF file is deployed. In the case of PostACard, my globals.xml file looks like this:
<globals>
<global name="flickrAPIKey"
value="MY FLICKR API KEY HERE" />
<global name="sendPostCardServiceUrl"
value="EMAIL SENDING SCRIPT HERE" />
</globals>
The reason I didn’t include the globals.xml file, is that I didn’t want those two values to be made public 
- You can get a Flickr API key for yourself at api.flickr.com
- You can now download the server source code from here:
http://www.munkiihouse.com/flexapps/postacard/postacard_server.zip
The main entry point for the server is postacard.php
[...] After finishing PostACard (total development time was 6 weeks), I made the source code (both the Flex code, and server side PHP) available on this blog, so that anyone could check it out. I place no restrictions on how you use this code. If there’s anything in there that’s useful to you, then you can do what ever you like with it. You can get the code here! [...]
[...] for me! I really appreciate it! The only thing I can offer you in appreciation is the full source code of the application. I hope you find it [...]
what does this mean? xmlns:degrafa=”http://www.degrafa.com/2007″
where is source of degrafa component
@Jeffrey
That statement is a way of importing all the classes (in all packages) from the degrafa library in one go. This is the same method used for the ‘mx’ namespace.
You can get the degrafa source code from their Google Code page here: http://code.google.com/p/degrafa/
This is a great app. with a bunch off usefull thinks.
I still have one question is it me or isnt this scalable. If i try to load in more then 40 pics it just loads for ever and finally the 15 secs timeout message appear. I can’t figure out what cause the heavy load.
Could anyone put me in the right direction?
i already removed all the useless containers that where flying around.
Regards.
Got a nasty workaround.
in library.mxml
Just wait with adding the dataprovider LibraryManager.manager.Photos to baseRepeater.
i added first all the photos with LibraryManager.manager.addPhoto before a bind the baserepeater to it.
Flex was like a trillion times measuring around containers and other. just once is more then enough 
Even changable photo and object albums are no problem to add.
400 photo’s without a glitch, after changing this, no matter what the source is.
thanks
Tony Fendall.
Hi Ethereal
Thanks for posting the work around, and I’m glad you found this code to be useful.
This application was developed during my evenings over a 4 week period in order to be ready in time to enter it into the 360|Flex competition. Due to that very fast development cycle, I didn’t have any time to optimize anything, and I put almost no thought into scalability at all.
Hi Tony,
Very nice stuff….good job within a short span of time…
Thanks a lot!
Avi