NewmanNewman's Own

Nutritious and low in carbs

Coming to a Device Near You

Posted Monday, February 14, 2005 9:48:30 AM by Newman

Just read an interesting article on TechWeb about Macromedia's new licensing agreement with Nokia. According to the article, "Nokia would incorporate Flash development tools within the tool sets Nokia provides to the 1.8 million registered developers in its Forum Nokia community, opening up a 'huge' market for Macromedia."

Flash Lite 1.1 is already bundled with Samsung handsets, but this announcement means that Macromedia "now has agreements with two of the top five handset makers."

You can learn more about Flash Lite, and download the Content Development Kit (CDK), in the Mobile and Devices Developer Center. Developers can also purchase Flash Lite Player from Macromedia for US $10. Here is a list of currently supported devices.

I'm looking forward to the day when Flash is installed on digital VCRs such as TiVo. The latest announcement about IPTV, and its interactive features, is an important first step. Let's just hope we don't have to purchase Norton AntiVirus for Microsoft TV...

Category tags: Flash

Storing Arrays in Shared Objects

Posted Friday, February 11, 2005 4:34:36 PM by Newman

Here's a weird one. I recently completed a Flash application in which two combo boxes and a list share the same data provider. Everything worked fine until I stored the array in a shared object. Then the List component began to display multiple selections, even though the multipleSelection property was set to false.

Several hours later, I looped through the contents of the shared object. Turns out, it was storing the DataProvider.__ID__ property. And what's more it was storing duplicate values. Hence the multiple selections. The workaround was to loop through the shared object and delete every __ID__ property. Of course, this largely defeats the purpose of using the DataProvider API.

var len:Number = myCookie.aEngines.length;

for(var i:Number=0;i<len;i++){
	if(myCookie.aEngines[i].__ID__ != undefined){
		// remove DataProvider.__ID__ property
		delete myCookie.aEngines[i].__ID__;
	}
}

This is one of the things that drives me nuts about the v2 components. One shouldn't have to spend half a day debugging issues like this. If the DataProvider class had been more carefully written, all of this could have been avoided. For example, this is the code that generates the __ID__ property, which is "used in data-aware components to keep lists of what items are selected" (see LiveDocs):

//::: Adds a "lazy" Unique ID facility to all objects.
Object.prototype.LargestID = 0;
Object.prototype.getID = function()
{
	if (this.__ID__==undefined) {
		this.__ID__ = Object.prototype.LargestID++;
		_global.ASSetPropFlags(this, "__ID__",1);
	}
	return this.__ID__;
}
_global.ASSetPropFlags(Object.prototype, "LargestID",1);
_global.ASSetPropFlags(Object.prototype, "getID",1);

Why isn't __ID__ a private property, and why doesn't the DataProvider class generate a truly unique ID?

If Flash is going to be adopted as a reliable platform for deploying Rich Internet Applications, the components have to work all of the time - not just most of the time. That's why there's already great anticipation about Grant Skinner's GLIC components: developers are clamoring for reliable Flash components.

So here's my wish list for the next iteration of the Flash components. They must be:

  • Reliable
  • Lightweight
  • Easily skinned
  • Easily styled
  • Easily extended
  • Less CPU-intensive

While we're at it, creating your own components is not exactly a walk in the park either. Looking forward to 8-Ball... ;-)

Category tags: Flash

See Community MX content by Newman