Am at the Flash Forward Conference at Austin. Has been fun so far even though I am really tired. I attended a few useful sessions so far one of which I am not allowed to speak about ;). I think the most educational session has been the one on the Flex component life-cycle by Chafic Kazoun. I have been reading about it but its different when someone walks you through the code of a custom component. Quick notes from the talk:
1) Lifecycle: constructor -> createChildren -> commitProperties ->measure -> updateDisplaylist.
2) The constructor and the createChildren is called only once.
3) Invalidation: invalidateProperties, invalidateSize, invalidateDisplaylist each calls a corresponding commit event to be fired from Flex.
4) Embedding swfs and ripping symbols from the library: [Embed(source=”/assets/source.swf” symbol=”[symbol_linkage]”]
5) I have never used the BitmapAsset class. Need to look at what that is.
6) In the updateDisplayList call [instance].move(x,y) rather than [instance].x = [value] since move fires additional functions that let flex layout stuff correctly.
7) Measure doesnt get called if width,height are declared explicitly.
8) You can access unscaledwidth, unscaledHeight in the updateDisplaylist functions to layout your stuff. Call the children’s setActualSize function accordingly.
Another tip from a different talk:
[Flash8] CacheAsBitmap your masker and maskee to get smooth 8bit alphas.
Thats it so far. More stuff as it happens.