0 Replies Latest reply on Apr 29, 2011 2:47 AM by cpthk0

    How do I use a Sequence component in a separate file?

    cpthk0 Level 1

      I have my TileList control in the following code, and the data effect code in a separate file. I can't link them together. Here is the example I read (http://livedocs.adobe.com/flex/3/html/help.html?content=createeffects_5.html), but it's in flex 3 version. I don't know how to do that in flex 4. Can you one tell me how to do it?

       

      //======================CODE START

      <?xml version="1.0" encoding="utf-8"?>
      <mx:TileList xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   itemsChangeEffect="{dataEffect}">                                 // <- Where my question is
         
          <fx:Script>
              <![CDATA[
                 
                  import effects.dataEffect;
                 
              ]]>
          </fx:Script>
         
      </mx:TileList>


      //======================CODE END

       

      My data effect in a separate file effects/dataEffect.mxml here:

      //======================CODE START

      <?xml version="1.0" encoding="utf-8"?>
      <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx">
          <fx:Declarations>
              <s:Sequence id="seq">
                  <mx:Blur
                      blurYTo="12" blurXTo="12"
                      duration="300"
                      perElementOffset="150"
                      filter="removeItem"/>
                  <mx:SetPropertyAction
                      name="visible" value="false"
                      filter="removeItem"/>   
                  <mx:UnconstrainItemAction/>
                  <mx:Parallel>
                      <mx:Move
                          duration="750"
                         
                          perElementOffset="20"/>
                      <mx:RemoveItemAction
                          startDelay="400"
                          filter="removeItem"/>
                      <mx:AddItemAction 
                          startDelay="400"
                          filter="addItem"/>
                      <mx:Blur
                          startDelay="410"
                          blurXFrom="18" blurYFrom="18" blurXTo="0" blurYTo="0"
                          duration="300"
                          filter="addItem"/>
                  </mx:Parallel>
              </s:Sequence>
          </fx:Declarations>
         
         
      </s:Group>

      //======================CODE END