Web Design Resources & Tutorials to help you design the best website!
So These Tags were in Ely’s Greenfield Video talking about how to make an Interactive List, Basically You can think of these tags as creating symbols or short definitions of a small component that you would like to make and keep reusing over and over again. Example: You want to construct a dozen panels and each of them has to have the same thing inside of them. It is a pretty simple concept once you see the code but could be pretty powerful. To better understand here is the code and the example. Need Flash Player 10 to view it, and I am using the Latest Flex 4 SDK.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="library:adobe/flex/halo" xmlns="http://ns.adobe.com/mxml/2009" xmlns:ns="library:adobe/flex/gumbo"> <Library> <Definition name="myNewSymbol"> <!--So THe NEw Symbol Is just going to Contain an Button and a Text--> <ns:Group layout="flex.layout.VerticalLayout"> <ns:TextGraphic text="Hello This Is Part of The Symbol"/> <ns:Button label="I am also Part of the Symbol"/> </ns:Group> </Definition> </Library> <!--So We instantiate the Symbol by calling the Definition Name and that is it--> <mx:Canvas> <myNewSymbol/> </mx:Canvas> </mx:Application>
Visit the Forums if you have any other questions.
Example:

1 Response to Using the New Library and Definition Tags in Flex 4
superseva
September 5th, 2008 at 4:03 am
uh, that would be very nice, especialy if we get some AS metods with wich we can go through library , fetch some items dynamicaly, and stuff…I can see this can be very handy.