The FlashChemist!

My Experiments and Thoughts on the Flash Platform

A PureMVC multicore sample for pure AS3 Flex Builder 3.0 project

leave a comment

I have been searching for a sample of pure as3 project sample (using Flex Builder 3.0), for a new assignment. I have been using PureMVC multicore for my module Flex/AIR based applications, but never did a pure as3 project.

Here is the link to the beautiful tutorial by Actionscript 3.0 design patters. The source is available for view or download. The downloaded file is a Flex Builder archive and can directly be imported into Flex Builder workspace.

Written by Vipin

March 3rd, 2010 at 6:33 pm

Posted in Flash

Tagged with ,

HashTab – Free Hash Checking Utility for Windows and Mac

leave a comment

Here is a cool utility that bakes into your OS file explorer. The utility is an OS extension and once installed you can (on windows) right click on a file and select ‘Properties’, which gives you an additional tab called ‘File Hashes’, which has different hashes of the file. On Mac select “File Hashes” (on 10.5 the “File Hashes” menu item will be found under the “More” submenu). HashTab supports many hash algorithms such as MD5, SHA1, SHA2, RipeMD, HAVAL and Whirlpool. Hashtab is supported as a Windows shell extension and a Mac Finder plugin.

Hash values are used to check the file integrity when you transfer files over a protocol, or after zipping and unzipping the same.

Download the utility here.

Written by Vipin

March 3rd, 2010 at 6:12 pm

Posted in Utilities

Tagged with ,

Get AIR 2.0 SDK Work on Your Flex Builder 3.0

4 comments

I have been trying to get AIR 2.0 beta work on my Flex Builder 3.0 on Windows (I am using XP, but it should be more or less same on all Win boxes). I didnt find any straight forward tutorial from anyone which takes us the step-by-step way :)

I did make it work, so here is how:

Its obvious that you will have Flex Builder 3.0 installed on your machine. I am using Flex Builder 3.0 plug-in on Eclipse Ganymede.

Download the AIR 2.0 beta SDK from Adobe Labs. Its a zip file which is intended to ovelay your current SDK, that means its a collection of files which are going to replace your current files in the SDK folder.

Next, make a copy of your latest SDK. I am using 3.4.0, so I made a copy of that folder and named it ‘3.4.0.air.2.0beta’. Hope you know where will be the SDK placed. For me it was under ‘C:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks’. It may vary for you.

Copy the downloaded zip file inside this SDK folder you created new (3.4.0.air.2.0beta). Right click and say unzip/unarchive/extract all or whatever the utility you are using is saying.

Here, you need to make sure that you are not extracting the zip to a new folder. You should extract the contents of the zip to the root of the folder ‘3.4.0.air.2.0beta’. Make sure you mention to overwrite the files while unzipping. It basically gets you new airglobal.swc and other supporting files (like adl).

Now go back to your project explorer, and create new AIR project.

Right click on the project and select ‘Properties’ and move to ‘Flex Compiler’ tab (shown below)

Click on the ‘Configure Flex SDK’ link. It will open the Flex SDK configuration window (shown below)

Click on Add and add your new SDK you created now (for me the folder ‘3.4.0.air.2.0beta’ and I named it 3.4.0 AIR2). Click OK.

Come back to the project properties window, and select the new SDK from the list (as shown below). You need to select the ‘Use specific SDK radio button, and select the new SDK from the list.

Now you have your AIR 2.0 beta SDK set-up. But this is not it, you have to do one more thing. Open up your application XML file (it should be named ‘YourProjectName-app.xml’. You have to change namespace to 2.0beta if its not set already. The top part of the file will look like below:

http://ns.adobe.com/air/application/1.5.3 will become http://ns.adobe.com/air/application/2.0beta

Now, you should have access to all of your AIR 2.0 api’s. If you are using OS specific API’s like NativeProcess, File.openWithDefaultApplication() methods, you need to add one more tag to your application XML. Please see the tag in the above picture.

Now, hopefully you have everything working with new SDK.

If you are a MAC user, follow this post which tells you how to do it on a MAC OSX.

Hope it helps someone. Happy beta testing… Let me…no no Let Adobe know if you have any issues with the new SDK ;)

Written by Vipin

March 3rd, 2010 at 4:32 pm

Posted in AIR

Tagged with

New Print Features in Adobe AIR 2.0 beta 2

leave a comment

Here is a video interview by Ryan Stewart with Rick Rocheleau on the new features available in Adobe AIR 2.0 beta 2. The new beta is now available in adobe labs.

Thanks Peter Elst for sharing this video on his blog.

Written by Vipin

February 28th, 2010 at 6:31 am

Posted in AIR

Tagged with

Stop All Sounds playing in a Flash Movie

one comment

Well, I didnt know that there is no stopAllSounds() in AS3 compared to AS2 world. But ofcourse you need this method most of the time to stop all the sounds playing in a movie irrespective of the source or hierarchy.

The stop all sound functionality exists, but moved to a new safe place, called the ‘SoundMixer’ class. Why in SoundMixer? No idea.

SoundMixer.stopAll()

is going to do the trick for you.

I always used to feel that why playing sound in AS 3.0 is so complicated. You have to use Sound, SoundChannel, and SoundTransform to write a basic Audio Player. At times SoundMixer tooo.

Written by Vipin

February 28th, 2010 at 5:18 am

Posted in Flash

Tagged with