Posts Tagged ‘runtime’


Creating FXG-Library Elements at runtime in Flex 4 (Gumbo)

May 28, 2009. Posted by Andy Hulstkamp in Actionscript 3, FXG, Gumbo (Flex 4 beta). 2 Comments »
Keywords: , , , , , , ,

Part of the FXG 1.0 specification in Flex 4 makes it possible to define elements inside a library. The elements can then be re-used in a FXG document:

<!--Library with the definitions -->
<Library>
   <Definition name="circle">
	<s:Ellipse x="0" y="0" width="100" height="100" >
	   <s:fill>
		<s:SolidColor color="0x000000" />
	   </s:fill>
	</s:Ellipse>
   </Definition>
</Library>
 
<!-- use some instances of the definition  -->
<circle/>
<circle x="200" y="100"/>
<circle x="300" y="100" height="75" width="75" />

As of now there is no way to create these symols at runtime. For example, if you’d like to create a starfield, you would need (more…)