F3 v. F4: Using ViewStack, TabNavigator and Accordion
| By Rich Tretola | March 9, 2010 | 273 views |
You have probably used mx:ViewStack, mx:TabNavigator and mx:Accordion somewhere in your Flex development efforts over the last 5+ years and had code that looks like this:

Fle 3 TabNavigaror and Accordion
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <mx:TabNavigator width="400" height="200" horizontalCenter="0" y="15"> <mx:VBox label="Tab 1"> <mx:Label text="This is tab 1"/> </mx:VBox> <mx:VBox label="Tab 2"> <mx:Label text="This is tab 2"/> </mx:VBox> <mx:VBox label="Tab 3"> <mx:Label text="This is tab 3"/> </mx:VBox> </mx:TabNavigator> <mx:Accordion width="400" height="200" horizontalCenter="0" y="225"> <mx:VBox label="Accordion 1"> <mx:Label text="This is Accordion 1"/> </mx:VBox> <mx:VBox label="Accordion 2"> <mx:Label text="This is Accordion 2"/> </mx:VBox> <mx:VBox label="Accordion 3"> <mx:Label text="This is Accordion 3"/> </mx:VBox> </mx:Accordion> |
Perhaps you would like to continue to use TabNavigator and Accordion within your Flex 4 efforts but you would like the children to be Spark components. Since there is no equivalent to these components yet within Spark, you will need still need to use the mx namespace within your Flex 4 application. If you have tried something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <mx:TabNavigator width="400" height="200" horizontalCenter="0" y="15"> <s:VGroup> <s:Label text="This is tab 1"/> </s:VGroup> <s:VGroup> <s:Label text="This is tab 2"/> </s:VGroup> <s:VGroup> <s:Label text="This is tab 3"/> </s:VGroup> </mx:TabNavigator> <mx:Accordion width="400" height="200" horizontalCenter="0" y="225"> <s:VGroup> <s:Label text="This is Accordion 1"/> </s:VGroup> <s:VGroup> <s:Label text="This is Accordion 2"/> </s:VGroup> <s:VGroup> <s:Label text="This is Accordion 3"/> </s:VGroup> </mx:Accordion> |
You will have received an error that said “The children of Halo navigators must implement INavigatorContent.“. So, what does this mean? Are you screwed and forced to start over and redesign your UI? No, the fix is easy, just wrap your Spark components in a Spark NavigatorContent component.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <mx:TabNavigator width="400" height="200" horizontalCenter="0" y="15"> <s:NavigatorContent label="Tab 1"> <s:VGroup> <s:Label text="This is tab 1"/> </s:VGroup> </s:NavigatorContent> <s:NavigatorContent label="Tab 2"> <s:VGroup> <s:Label text="This is tab 2"/> </s:VGroup> </s:NavigatorContent> <s:NavigatorContent label="Tab 3"> <s:VGroup> <s:Label text="This is tab 3"/> </s:VGroup> </s:NavigatorContent> </mx:TabNavigator> <mx:Accordion width="400" height="200" horizontalCenter="0" y="225"> <s:NavigatorContent label="Accordion 1"> <s:VGroup> <s:Label text="This is Accordion 1"/> </s:VGroup> </s:NavigatorContent> <s:NavigatorContent label="Accordion 2"> <s:VGroup> <s:Label text="This is Accordion 2"/> </s:VGroup> </s:NavigatorContent> <s:NavigatorContent label="Accordion 3"> <s:VGroup> <s:Label text="This is Accordion 3"/> </s:VGroup> </s:NavigatorContent> </mx:Accordion> |
Here is the result:

Topics: Flex 3 (Moxie), Flex 4 | No Comments »
iPhone Flash: What did @kevinlynch just say?
| By Rich Tretola | February 18, 2010 | 1,641 views |
What did he just say?
Back in October when I first discussed the new CS5 compile to iPhone workflow from Adobe, in my post titled “Appleās greed to only help Adobe with Mobile Flash Player” I mentioned the following with the important part in bold:
“Adobe had to create a way to allow for applications built on the Flash Player to act as native iPhone applications. This was only possible by actually embedding the Flash Player within the application and then submitting the whole thing for approval to Apple just as any other application that goes to Apple for approval.”
The concept that the player was embedded within the compiled iPhone applications was quickly debated in the comments section of that post. Now we get the video below where at aprox. 2:58 Kevin Lynch says “The Flash runtime is integrated with the application“.
Video courtesy of All Things Digital
So, which is it? Are the Flash/iPhone applications compiled with the Flash Player embedded within the iPhone application or is the Flash application converted to be a native iPhone application?
Topics: Flash Player, iphone, mobile | 4 Comments »
Adobe AIR on Mobile – here’s the most important sentence!
| By Rich Tretola | February 15, 2010 | 1,472 views |
Unless you have been offline all day today, you have heard that Adobe has made an official announcement on the time lines of Flash Player 10.1 mobile as Adobe AIR mobile. Here is the official press release.
Since the announcement, a bit more information has come out and I have narrowed all of the information down into one key sentence. It was posted on the AIR Team blog. And here it is in bold…
“Using Adobe AIR, developers and designers will be able to build standalone applications to target devices running the Android operating system. These very same applications can also be deployed as desktop AIR applications on Windows, Mac, Linux, and also as applications on the iPhone using the”
What does this mean? Well, write your AIR application once and distribute it across all mobile platforms including iPhone. If and when Adobe pulls this off, it will make for some very happy developers.
Topics: Adobe AIR, Announcements, android, mobile | Comments Off
F3 v. F4 Tile v TileGroup
| By Rich Tretola | February 9, 2010 | 1,076 views |
Here are two applications that perform the same task. They layout 9 custom button components in a grid. One is Flex 3 and the other is Flex 4.
Main Application (Flex 3):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*"> <mx:Tile horizontalCenter="0" verticalCenter="0" width="400"> <local:TileButton label="1"/> <local:TileButton label="2"/> <local:TileButton label="3"/> <local:TileButton label="4"/> <local:TileButton label="5"/> <local:TileButton label="6"/> <local:TileButton label="7"/> <local:TileButton label="8"/> <local:TileButton label="9"/> </mx:Tile> </mx:Application> |
TileButton Component:
1 2 3 4 5 6 7 8 9 10 11 12 | <?xml version="1.0" encoding="utf-8"?> <mx:Button xmlns:mx="http://www.adobe.com/2006/mxml" click="Alert.show(event.currentTarget.label)" width="100"> <mx:Script> <![CDATA[ import mx.controls.Alert; ]]> </mx:Script> </mx:Button> |
Here is the result:
Main Application (Flex 4):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:local="*"> <s:TileGroup horizontalCenter="0" verticalCenter="0" width="400"> <local:TileButton label="1"/> <local:TileButton label="2"/> <local:TileButton label="3"/> <local:TileButton label="4"/> <local:TileButton label="5"/> <local:TileButton label="6"/> <local:TileButton label="7"/> <local:TileButton label="8"/> <local:TileButton label="9"/> </s:TileGroup> </s:Application> |
TileButton Component:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?xml version="1.0" encoding="utf-8"?> <s:Button xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" click="Alert.show(event.currentTarget.label)" width="100"> <fx:Script> <![CDATA[ import mx.controls.Alert; ]]> </fx:Script> </s:Button> |
Here is the result:
As you can see, this one is a pretty similar comparison of the Flex 3 v. Flex 4 ways to do Tile layouts.
Topics: Uncategorized | 2 Comments »
Nexus One Flash Player Coming Soon!
| By Rich Tretola | February 8, 2010 | 1,180 views |
Word in the twitterverse is that Adobe gave their evangelists some new toys today. Yes, that’s right, the HTC Nexus One with Flash Player 10.1 beta! When will the rest of us see this beta? Hopefully, very soon.
Topics: Flash Player, android, mobile | 5 Comments »
« Previous Entries







