AIR update framework for Flash CS4

•November 7, 2009 • Leave a Comment

While I was preparing for the upcoming eSeminar on AIR with Flash CS4, I researched on the topic of creating an AIR app that can detect version number and do update automatically. I found the following article by Jeff Swartz very easy to follow.

http://www.adobe.com/devnet/air/flash/quickstart/update_framework.html

It works perfectly. Still as I think about the whole process, I wonder why we need the 2 xml files: updateConfig.xml and updateDescriptor.xml at all. The AIR update framework should allow the info of updateConfig.xml be scriptable in the AS code itself. And the checking of the version should be against the -app.xml that AIR packager generated. The updateDescriptor.xml is really redundant. I’m always striving for simplicity and the fact that I have to create 2 additional xml files is tedious work for me. Having said that at least the update framework works so I can’t complaint too much:)

Learning resources materials for the teachers by the teachers

•September 29, 2009 • Leave a Comment

Below are links to 2 websites which have a lot of great learning and teaching materials. And these web sites are all created by teachers who are passionate in technology and so dedicate their own time to build the sites. Very commendable. Check this out:

http://teachersbeehive.com/

http://www.flashclassroom.com/

Cancer Council Fundraising

•September 16, 2009 • Leave a Comment

It’s the time of the year again. Adobe Pacific is running a fundraising event for the Cancer Council Australia. In particular, there is a photo competition which goes along with the event. If you would like to support a good cause and have a bit of fun, check this out:
http://www.livingawesomeness.com/

Photoshop.com Mobile for HTC TouchPro 2

•August 22, 2009 • 1 Comment

I have recently upgraded my phone to the HTC Touch Pro 2. It is a lovely phone and I would say by far the best Windows Mobile phone out there. I have been trying out the Photoshop.com Mobile and am pleased to say the it runs well on TouchPro 2. The program reads the photo stored in my phone and let me choose which one to upload. Recently Photoshop.com (desktop version) has a new feature which allows users to upload and share videos as well. This isn’t available for the mobile version yet. I hope it would be there one day.

To try out Photoshop.com Mobile, go to:

https://www.photoshop.com/?wf=mobile&promoid=DTELE

Run-time Error Handling for Flash App

•August 8, 2009 • 1 Comment

I have been preparing an eSeminar on the topic of Flash Security. It was then I started reading about the subject of run-time error handling, like how to handle when security does not permit certain actions. Broadly speaking, there are asynchronous run-time error and synchronous run-time error.

Below is an example of handling async security run-time error when loading of external data is not permitted. As you can see the way to deal with this is to use event listener:

var xmlData:URLLoader = new URLLoader();

xmlData.load(new URLRequest(“http://localhost/FlashSecurity/fms_rss.xml“));

xmlData.addEventListener(Event.COMPLETE, doData);

function doData(e:Event):void
{
 result_txt.appendText(xmlData.data);
}

// use event listener to handle asynchronous error
xmlData.addEventListener(SecurityErrorEvent.SECURITY_ERROR, doError);

function doError(e:SecurityErrorEvent):void
{
 result_txt.appendText(String(e));
}

Below is an example of handling sync security run-time error when cross-scripting is not permitted. As you can see the way to handle this is to use try/catch mechanism:

var swfContent:Loader = new Loader();
stage.addChild(swfContent);
swfContent.x = swfContent.y = 0;

swfContent.load(new URLRequest(“http://localhost/FlashSecurity/b.swf“));

swfContent.contentLoaderInfo.addEventListener(Event.COMPLETE, doContent);

function doContent(e:Event):void
{
 // use a try and catch block to handle synchronous error
 try
 {
  swfContent.content["lensFlare_mc"].play();
 }
 catch (e:Error)
 {
  result_txt.appendText(String(e));
 } 
}

You can find more details description of error handling at the AS 3 help.

Best Desktop Zooming Tool Ever

•August 6, 2009 • Leave a Comment

I have previously posted about the nifty little utility called ZoomIt that I downloaded from the Microsoft site. It was great for doing presentation and software demonstration. ZoomIt is now updated to version 4 and it is everything I want from a desktop zooming tool. Live Zoom is now working properly in my ThinkPad running Vista :)

If you are running Windows, that is a great utility to have. If I were MS CEO, I would put that into Win 7. It is much better than the built-in zoom tool. Check this out at:

http://technet.microsoft.com/en-us/sysinternals/bb897434.aspx

Looping video with Flash CS4 Video Component

•July 24, 2009 • 5 Comments

I got a demo requirement to have a video playing continuously within the Flash CS4 video component. I found that none of the skins include a loop button. Bummer. So I create one. Fortunately the video component has a video event call “autowound” which I can use to trigger the play method once the playhead has been rewind. Below is the code for you to try it out:

import fl.video.VideoEvent;

fl_video.autoRewind = true; // fl_video being the name of the video component

fl_video.addEventListener(VideoEvent.AUTO_REWOUND, doLoop);

function doLoop(e:VideoEvent):void
{
 e.target.play();
}

Truely awesome video

•July 15, 2009 • 2 Comments

Click the link below for the Flash video site from Philips. It is so awesome I couldn’t find the words to describe how good it is. See for yourself.

http://www.cinema.philips.com/?ls=gb_en

CSS layout – fix and fluid combined

•July 5, 2009 • 11 Comments

I have been playing with the Dreamweaver layout sample: 2 column hybrid. The hybrid layout is quite a flexible layout as it would expand or contract based on the width of the browser window. Problem would arise if the browser window is too narrow and the layout will flow beyond what I want. I found out that setting the CSS min-width attribute of the #container class would solve the problem. Horizontal scrollbar will display if the browser window is too narrow.

I then added the max-width attribute to the #container as well to see what happen. The end result is very good. It would mean that page would expand up to the max-width. Beyond that the layout would fix the width. I consider this the best of both world, fix and fluild combined layout.

Tested with MS IE 8 and Goolge Chrome. Haven’t tested on other browsers.

Awesome Flash sites

•June 29, 2009 • Leave a Comment

Someone showed me the following sites which are simply stunning:

Philips Cinema TV: http://www.cinema.philips.com/?ls=gb_en

Panasonic PMA Show: http://www.panasonic.com.au/pmashow/

Hope you like these.