Notes from day 1 and 1.5:

Like I had mentioned in my earlier post, the Flex team at Comcast Interactive Media in undergoing a training for three days on all things Flex with Jeff Tapper (of the Adobe Flex Training from the Source book fame). I have been in and out for the most part but the team seems to have absorbed a lot.

Here is a quick list of things that I learnt:

Using [style] metatags to create accessable styles:
By just putting the [Style] tag, you can make the styles available to you (well, more visibly anyway). You can also add the inherit=yes value in the style definition and the style will get picked up from the parent’s style values. Something a lot more interesting that I was looking for is the StyleManager.registerParentSizeInvalidatingStyle method that forces the parent to measure itself when a style value could potentially grow the component to a larger value needing the parent to do the same.

Using BindingUtils and the ability to bind to events:

I have never done the latter (weird I know). However it seems if you but the bindable metatag with the event name on top of a function, that function is called whenever that event is fired. Since we didnt specify a target (source) of the event, does this event get fired anytime anyone fires that event? I am still not sure.

Using namespaced XML:
If an XML file has namespaced nodes, you cant access those nodes until you include that namespace in the XML definition. To do that you would create a namespace variable and then use that to reference the namespaced nodes:

For example

x:XML = …
var rdf:Namespace = new Namespace(“http://rdf……”)
var dirvalue = xml.rdf::Directories
Note the use of the ::

Using ASyncToken:
This is returned from the HttpService call. It acts as a token for the call and can be used to attach fault and result functions to. I have never used it. Interestingly the Flex source code doesnt including the rpc package so I have no idea how its created.

Event Lifecycle:
We saw the difference between the and the event.currentTarget. Also what was really useful was figuring out the event.stopPropagation and the event.stopImmediatePropagation. The former stops the event from going anywhere up the Displaylist but if you have two event listeners added to the same displayobject, both will get the event if you only use stopPropagation, but if you use stopImmediatePropagation, you can intercept the event preventing it from going any further even to other listeners on the same node in the DL. This property can get more useful when you use event priorities to register listeners.

Ran through a simple example of using modules especially using the -link-report and the -exclude-externs compiler directives to make sure the modules only compile whats needed. Apparently this gets easier in Flex 3.

These are just my notes, since most of the other stuff we talked about I already know ;). More stuff here tomorrow.

2 thoughts on “Notes from day 1 and 1.5:”

  1. BindingUtils: All events ‘bubble’ up and so your component can listen out for them.
    RPC package: This is by far not the only components that the source for isn’t available. Normaly their live inside playglobals.swc or the Player itself.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s