I found a very cool way to disable the browser cache for my .swf files. When I have searched for a solution for this problem, I found that you can add a dummy parameter, like timestamp or date, to your swf file and the browser will re-download the file. This solution is wide spread on every site that offer a solution for this issue, but I don’t like it because the browser still cache your swf file, creating multiple cache files for a single .swf file. So, after reading a lot of blogs I found the following solution:
I had installed Flash Builder builder some time ago and everything just seems to be allright, but when I had to made a major refactoring for all modules belonging to a very large project Flash Builder started to run slower than Flex Builder. The configuration of my PC is very good, Intel dual core at 2 GHz and 3 gb of RAM and I had allready Flex Builder installed and it worked just fine. After I done some reasearch I found that you can increase the JVM memory, so these are the steps you must follow:
- Exit Flash Builder ( or Eclipse if you have installed Flash Builder as an Eclipse plugin ) if is allready running.
- Open your FlashBuilder.ini or eclipse.ini located in your installation folder. For Windows user: C:\Program Files\Adobe\Adobe Flash Builder 4\FlashBuilder.ini ( if you are using a 64 bit operating system you must search in C:\Program Files(x86)\Adobe\Adobe Flash Builder 4\FlashBuilder.ini ) or <path to Eclipse>\eclipse.ini .
- Find the maximum heap size setting, e.g. “-Xmx512m”.
- Change the maximum heap size. I set it to 1024 mb, e.g. “-Xmx1024m”. Be careful to not allocate more memory than your pc has.
- Save the file.
- Restart de Flash Builder or Eclipse, now it should run faster.
Mac users can find the *.ini file this way:
- Right click on Adobe Flash Builder 4.app or Eclipse.app, Show Package Contents
- Open Contents > MacOS > Adobe Flash Builder 4.ini or eclipse.ini
In order to create a native installer for your AIR application with ADT you need to go from command line to your bin-debug folder and follow these steps:
1. Create a certificate:
adt -certificate -cn CertificateName 1024-RSA certificate.p12 yourPass
2.Create the air archive:
adt -package -storetype pkcs12 -keystore certificate.p12 Application.air Application-app.xml Application.swf <You can also add here other files wich you can find in your application directory >
You will pe prompted for your certificate password that you set at step 1.
3.Create native installer:
adt -package -target native Application.exe Application.air
Now you can distribute Application.exe to your customers.
Note. If you want to create a native for a specific operating system you must run the command from above on your preferred OS. I created this exemple on a Windows OS.
The flash player 10 has new rules for UIA ( user initiated action ) so when I tried to use the FileReference save method I got the following error: Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press. After I made some research I found a very cool article here, but I didn’t found any workaround.
I wrote this post because a lot of people are asking if is possible to use MySQL stored procedures with AS3FlexDB and how. You can use AS3FlexDB, but first you must make some changes, because the mysql extension can’t handle the data sets returned by stored procedures.
If you want to integrate a map in your Flex application all you need to do is to go to Yahoo! Developer Network and download YahooMap-0.9.4.swc add it to your lib folder and copy/paste the code from below. You will find at Yahoo! Developer Network more, very helpful examples. Of course don’t forget to request your developer key, you will need the key to acces Yahoo! maps API.