I’ve been working on a Flex radio button component that will allow users to select nested options. The control accepts an XMLList as the data source for the button options, and expands to show nested buttons beneath selected options according the data passed in to it. The nest level of radio buttons is essentially infinite.
The best way to understand it is to take a look.
For the moment, this is only a proof-of-concept version of the control. The control has 2 values to indicate selected values. One is bottomValue which holds only the value of the bottom-most selected radio button. The other is fullValue which holds a comma separated list of values beginning with the top-most value and ending with the bottom-most value.
With this version of the component, you can also pass in an initial bottomValue and the control will select all of the parent radio buttons recursively and accurately fill in the fullValue field.
Flex developers: Check out the control and let me know what you think! If there is significant interest, I’ll work on revising the component to feel more like a native Flex Framework control and add some additional features to it. It’s usable as is, but needs work to polish it up before it can used efficiently and reliably in a live Flex application.
8 Comments | Brent | Adobe Flex
I recently ran across a question in a Flex forum from a visitor asking how to embed YouTube videos inside Flex . The solution is very simple. Since the YouTube player is a Flash object itself, we can simply use the SWFLoader object to load the Youtube video into our Flex app. You just need to copy the embed code on the YouTube page for the video you want to embed in your application. It will look like this:
<object width="425" height="344" ><param name="movie"
value="http://www.youtube.com/v/zlfKdbWwruY&hl=en&fs=1" >
</param><param name="allowFullScreen" value="true" >
</param><param name="allowscriptaccess" value="always" >
</param><embed src=http://www.youtube.com/v/zlfKdbWwruY&hl=en&fs=1
type="application/x-shockwave-flash"
allowscriptaccess="always" allowfullscreen="true"
width="425" height="344" ></embed></object >
Then just grab the URL to the video from the embed code and use it as the source property for your SWFLoader. I created a working sample here with view source enabled.
Tags:
Permalink |
3 Comments | Brent | Adobe Flex
This is an excellent video detailing the lifecycle of Adobe Flex components. Unless you are an expert Flex dev, you are almost certain to hear a tip that will improve your applications efficiency by watching it. I really wish I would have known even just some of the information in this video before beginning work on my recent projects. I'm including it here on my blog for my own reference, as well as any Flex devs that happen upon my other Flex posts. It's about an hour long - but well worth the time!
Tags:
Permalink |
1 Comments | Brent | Adobe Flex
I posted a few how-to articles on Adobe's Flex Cookbook site recently and to say thanks they sent me this great Flex 3 book from O'Reilly!
I'm not sure if the book was to say thanks, or if my articles were so crappy that they felt sorry for me and thought I needed to learn more about Flex! Just kidding, my articles rock - check 'em out !
Thanks for the great book Adobe!
Tags:
Permalink |