Creating Symbols in Flex 4

Sat, Sep 6, 2008

Flex

Here is another example of How you can create symbols in Flex 4 using the <Library></Library> and <Definition name=”test”></Definition> tags. They behave Similar to the Flash Symbols. Here is the Code and Example. Need Flash Player 10 to view it. Visit the Forums If You have any other questions

<?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" xmlns:local="*">
 
	<Library>
		<Definition name="symbol1">
			<ns:Group>
				<ns:TextGraphic text="Hello World"/>
			</ns:Group>
		</Definition>
 
		<Definition name="symbol2">
			<ns:Group layout="flex.layout.VerticalLayout">
				<ns:Panel width="400" height="100"/>
				<ns:TextGraphic text="I am part of the Panel"/>
			</ns:Group>
		</Definition>
 
		<Definition name="symbol3">
			<ns:Group>
				<ns:Rect width="400" height="100" radiusX="8" radiusY="8">
					<ns:fill>
						<LinearGradient>
							<GradientEntry color="0x32FFCC"/>
						</LinearGradient>
					</ns:fill>
				</ns:Rect>
			</ns:Group>
		</Definition>
 
	</Library>
 
 
		<symbol1/>
		<symbol2/>
		<symbol3/>
 
</mx:Application>

Spread the WorD domokun Creating Symbols in Flex 4 !

These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Digg
  • del.icio.us
  • Reddit
  • Technorati
  • StumbleUpon
  • Ask
  • RSSFEED


The Author:

Sherif - has written 67 posts on Flex & AIR.


Contact the author