Flex // AIR // Actionscript 3 reference for the IPhone

Tags: , ,

Mike Chambers has released an app for the iphone that lets you search the language reference for Flex // AIR // Actionscript 3.  As I use these all the time it's really awesome to have them at the tip of my fingers, literally.

Read about it and download it HERE

Tax tips for those who do independent contracting

Tags: , ,

Found a really great article on tax tips for those who do independent contracting, which is a lot of people in the Flex community.  It's a really great read, and could help you, as well as save you from a lot of trouble.

Read it here

Flex - Using IDropInListItemRenderer

Tags: , , ,

When you're within an item renderer where you want to know more about it's parent list, or underlying collection, IDropInListItemRenderer can be invaluable to you.  Once implemented, a BaseListData object is automatically passed into any item renderer that implements it.   From BaseListData a lot of things are available.  The following code shows a lot of things you can access from it.  For a more in depth description, check out the language reference BaseListData.

public function set listData(value:BaseListData):void
		{
 
			if(!value)return;
 
			var lb:ListBase = (_value.owner as ListBase);
			var collection:ListCollectionView = (lb.dataProvider as ListCollectionView)
			var total:Number = collection.length;
			var index:Number = lb.itemRendererToIndex(this as IListItemRenderer);
		}

If you have any comments or questions leave them below

Flex, swapping items in a ListCollectionView

Tags: , ,

I believe in the next version of Flex (Code name Gumbo) this method is going to be available on ListBase, but here's how we can swap items on a ListCollectionView (which is extended by both ArrayCollection and XMLListCollection.

public function swapItemsAt(fromIndex:Number, toIndex:Number, collection:ListCollectionView):void{
			var fromItem:Object = collection.getItemAt(fromIndex);
			var toItem:Object = collection.getItemAt(toIndex);
 
			collection.setItemAt(fromItem, toIndex)
			collection.setItemAt(toItem, fromIndex);
 
		}

If you have any questions or comment, feel free to leave them below

Flex - Using the [Mixin] meta tag

Tags: , ,

A metatag that is rarely talked about in the Flex world is the [Mixin] tag.  This tags primary use is to create static code blocks to initialize parts of your application.  It is run when the SystemManager first becomes available.  So about as early in the the application startup process as you can get.  Access to the SystemManager at early stages of application startup can be invaluable.  Luckily, it is really easy to write a mixin. And is done in the following manner.

[Mixin]
public class MyMixinExample{

                 /**
		 * called due to the fact that i've used the [Mixin] metatag
		 * @param systemManager
		 *
		 */
		public static function init (systemManager:ISystemManager):void{
			//do stuff
		}

When the application starts up, if you have a [Mixin] tag at the beginning of the class, it looks for a static 'init' function, and passes the SystemManager as an argument to the function.  Very simple, infinitely useful.

If you have any questions or comments feel free to leave them below.

Akamai Open Source video player classes

Tags: , ,

Akamai has released a set of classes that let you do some interesting and useful things that are required when building a video player.  The classes are capable of doing all of the following, and are released under an open source license.

  • Connecting to Akamai (and other services) through firewalls and proxy servers
  • Measure bandwidth
  • Double buffering
  • Play protected, live and encrypted streams
  • Handling cue points
  • Read playlists in Media RSS format

You can read the full post about this HERE

Flex - Grabbing all instances of SystemManagers

Tags: , ,

There are some cases when you'll want to be aware of all SystemManagers in your flex application (like when you load child applications).

This can be done fairly easily with the following code

import mx.managers.SystemManagerGlobals;
//top level list of system managers
			var systemManagers:Array = SystemManagerGlobals.topLevelSystemManagers;
			//length for efficiency
			var lng:int = systemManagers.length;
			for(var i:int = 0; i < lng; i ++){
                                       //type with a wildcard because we may encounter systemManager or windowed system manager
					var sm:* = systemManagers[i];
					//logic
				}
	  		}

This is the same logic that adobe uses to access these within the framework

Flight of the Conchords on the cover of Time Out New York

Tags:

If you haven't seen this show yet, you need to get on it now.  It's hysterical in a witty dry beat your brain to death kind of way.  It's new season starts Jan 18th Sundays at 8pm.

They came from New Zealand armed with songs about killer robots and racist dragons—and, improbably, they scored. Since June 2007, when their cultish musical-comedy show debuted on HBO, Jemaine Clement and Bret McKenzie, better known as Flight of the Conchords, have garnered a Grammy, two Emmy nominations and a No. 3 spot on the Billboard album chart (for their self-titled debut). Plus, this week’s cover! In advance of the January 18 launch of the second season of their HBO series, we spoke to Clement and McKenzie on the Flight of the Conchords set in Greenpoint.......

Session videos posted for Adobe Max 2008

Tags: , ,

See them HERE

Friday gloomy home sick from work playlist

Tags: ,

Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.