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 which contains the list of patterns applied by the FlashEff component on the target object. You can specify here one or more patterns to be applied by FlashEff. For each of the desired patterns, you'll have to specify the type, which is show, hide, filter, buttonEffect or filter, the pattern that you would like to apply, by giving the full class path and name of the pattern and finally, a list of properties for the pattern. Just like the properties for the component, they comprise of a main XML node with the name of the property and its type and value which should be assigned to it.

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




FREE Flash Components

Check out these free, fully functional AS3.0 Flash components by Jumpeye:

FlashEff 2.0 Free
(free for non-commercial use)

JC Panorama
(free for non-commercial use)

JC Play List
(fully free)

Basic Menu Pack V3
(free AS3 version)

MCTE V3
(free AS3 version)

JC Player
(free for non-commercial use)

JC Flash Map
(free for non-commercial use)

Flash Bookmarks
(fully free)

ActionScript Bridge AS2-AS3
(fully free)

JS Charts
(free for non-commercial use - JavaScript comp.)