FlashEff XML structure description
General | Patterns | Properties | Methods | Events | XML
FlashEff XML structure description
The FlashEff component can be set up using a XML file loaded from the local hard drive or a web service. Basically, the XML file contains a list of properties of the component and their values and a list of patterns applied by the FlashEff component on the target object. Each pattern from that list, in the XML file, also contains its own list of properties and their values. Here is how a typical XML would look like:
<?xml version="1.0" encoding="UTF-8"?>
<flashEff>
<params>
<showAutoPlay>
<type>Boolean</type>
<value>true</value>
</showAutoPlay>
<hideAutoPlay>
<type>Boolean</type>
<value>true</value>
</hideAutoPlay>
<showDelay>
<type>Number</type>
<value>0</value>
</showDelay>
<hideDelay>
<type>Number</type>
<value>2</value>
</hideDelay>
<targetVisibility>
<type>Boolean</type>
<value>true</value>
</targetVisibility>
</params>
<patterns>
<pattern>
<id>221</id>
<type>hide</type>
<name>com.jumpeye.flashEff.symbol.blur.FESBlur</name>
<params>
<blurX>
<type>Number</type>
<value>25</value>
</blurX>
<blurY>
<type>Number</type>
<value>25</value>
</blurY>
<blurQuality>
<type>Number</type>
<value>3</value>
</blurQuality>
<tweenDuration>
<type>Number</type>
<value>2</value>
</tweenDuration>
<tweenType>
<type>String</type>
<value>Regular</value>
</tweenType>
<easeType>
<type>String</type>
<value>easeOut</value>
</easeType>
</params>
</pattern>
<pattern>
<id>251__1</id>
<type>filter</type>
<name>com.jumpeye.flashEff.filter.reflection.FEFReflection</name>
<params>
<reflectionDistance>
<type>Number</type>
<value>5</value>
</reflectionDistance>
<reflectionAlpha>
<type>Number</type>
<value>0.5</value>
</reflectionAlpha>
<reflectionMargins>
<type>Number</type>
<value>10</value>
</reflectionMargins>
<reflectionDropOffPercent>
<type>Number</type>
<value>100</value>
</reflectionDropOffPercent>
<reflectionRatio>
<type>Number</type>
<value>255</value>
</reflectionRatio>
<smooth>
<type>Boolean</type>
<value>false</value>
</smooth>
<refresh>
<type>Boolean</type>
<value>true</value>
</refresh>
<refreshPerSecond>
<type>Number</type>
<value>30</value>
</refreshPerSecond>
</params>
</pattern>
</patterns>
</flashEff>
The first node is <params> which contains a list of nodes, representing the list of properties to set for the FlashEff component instance. As you can see, in the example above, not all the FlashEff's properties were declared. You only have to specify the properties that you would like to set, using the XML file, the rest being initialized by the component with their default values, if that is the case. All the properties, for the FlashEff component and the patterns, are specified using a XML node with the name of the property it has to set.
The second node in the XML file is
Property nodes
All properties have to be declared like in the following example:
<tweenType>
<type>String</type>
<value>Bounce</value>
</tweenType>
The property node has to have exactly the same name as the FlashEff component's or FlashEff pattern's property it will set. Inside the property nodes, you'll have to specify the type of the property (String, Number, int, uint, Boolean and Array) and the value that should be set. For Array type of properties the value has to be given as comma (,) separated Strings. In this case only commas are allowed to separate the Strings. Any white spaces after the commas, will be considered characters of the next String.
<tweenDuration>
<type>Number</type>
<value>3.5</value>
</tweenDuration>
<selectedStrings>
<type>Array</type>
<value>this,word,effect,text</value>
</selectedStrings>
General | Patterns | Properties | Methods | Events | XML