0 Replies Latest reply on Aug 7, 2013 8:58 PM by derrekteng

    any way to convert xfl or fla to custom format?

    derrekteng

      the fla format is not open source. but the xfl is.

      the DOMDocumtent.xml has this kind of format:

      ==================================================

      <timelines>

                <DOMTimeline name="scene 1" currentFrame="22">

                     <layers>

                          <DOMLayer name="layer 2" color="#9933CC" current="true" isSelected="true">

                               <frames>

                                    <DOMFrame index="0" duration="22" tweenType="motion" motionTweenSnap="true" keyMode="22017">

                                         <elements>

                                              <DOMSymbolInstance libraryItemName="symbol 1" symbolType="graphic" loop="loop">

                                                   <matrix>

                                                        <Matrix tx="43.3" ty="61"/>

                                                   </matrix>

                                                   <transformationPoint>

                                                        <Point x="278" y="144"/>

                                                   </transformationPoint>

                                              </DOMSymbolInstance>

                                         </elements>

                                    </DOMFrame>

                                    <DOMFrame index="22" keyMode="9728">

                                         <elements>

                                              <DOMSymbolInstance libraryItemName="symbol 1" symbolType="graphic" loop="loop">

                                                   <matrix>

                                                        <Matrix a="0.162002563476563" b="-0.0935211181640625" c="0.159713745117188" d="0.276641845703125" tx="253.25" ty="191.15"/>

                                                   </matrix>

                                                   <transformationPoint>

                                                       <Point x="278.05" y="144.05"/>

                                                   </transformationPoint>

                                              </DOMSymbolInstance>

                                         </elements>

                                    </DOMFrame>

                               </frames>

                          </DOMLayer>

                      .....

      ==========================================================

      it has all the info about this flash file. but, what i want is like kind of this:

       



      <key>fengmo</key>         // this is the name of scene or a symbol



      <dict>





      <key>frameRate</key>





      <real>20</real>





      <key>frameCount</key>





      <real>85</real>





      <key>layerCount</key>





      <real>10</real>





      <key>layerDict</key>





      <dict>






      <key>0</key> // this is the first layer





      <dict>







      <key>frameCount</key>







      <real>85</real>







      <key>keyFrameCount</key>







      <real>5</real>







      <key>keyFrameDict</key>







      <dict>








      <key>0</key>  // this is the first layer's first keyframe







      <dict>









      <key>startFrame</key>








      <real>0</real>








      <key>elementNum</key>








      <real>0</real>








      <key>elementDict</key>








      <dict/>// this keyframe has no element






      </dict>








      <key>1</key>








      <dict>









      <key>startFrame</key>








      <real>71</real>








      <key>elementNum</key>








      <real>1</real>








      <key>elementDict</key>








      <dict>









      <key>0</key>








      <dict>









      <key>type</key>









      <real>1</real>









      <key>libName</key>









      <string>l4_feng</string>









      <key>instanceName</key>









      <string></string>









      <key>depth</key>









      <real>1</real>









      <key>position</key>









      <string>{87,-10}</string>



















      <key>transformationPoint</key>









      <string>{0,0}</string>









      <key>scaleValue</key>









      <string>{1,1}</string>









      <key>rotation</key>









      <real>0</real>









      <key>skewValue</key>









      <string>{0,0}</string>



















      <key>alpha</key>









      <real>100</real>








      </dict>







      </dict>








      <key>motionEnd

      FrameIndex</key>










      <real>73</real>







      </dict>








      <key>2</key>








      <dict>









      <key>startFrame</key>








      <real>73</real>








      <key>elementNum</key>








      <real>1</real>








      <key>elementDict</key>








      <dict>









      <key>0</key>








      <dict>









      <key>type</key>









      <real>1</real>









      <key>libName</key>









      <string>l4_feng</string>









      <key>instanceName</key>









      <string></string>









      <key>depth</key>









      <real>1</real>









      <key>position</key>









      <string>{89,-10}</string>



















      <key>transformationPoint</key>









      <string>{0,0}</string>









      <key>scaleValue</key>









      <string>{1.1730804443359375

      ,1.1730804443359375}</string>










      <key>rotation</key>









      <real>0</real>









      <key>skewValue</key>









      <string>{0,0}</string>



















      <key>alpha</key>









      <real>100</real>








      </dict>







      </dict>








      <key>motionEnd

      FrameIndex</key>










      <real>75</real>







      </dict>


       

      ======================================

      as there is no direct method to save the xfl as the format of what I want,

      then, I have following questions:

      1 how can I convert the matrix info to the info of (position, transformationPoint, scaleValue, skewValue, rotation).

      2 I find that in the flash software, I can export xml motion, it's format is like this:

      <Motion duration="30" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">

                <source>

                          <Source frameRate="24" x="102" y="93" scaleX="0.18" scaleY="0.215" rotation="0" elementType="graphic" symbolName="zhiyingyong">

                                    <dimensions>

                                              <geom:Rectangle left="0" top="0" width="556" height="288"/>

                                    </dimensions>

                                    <transformationPoint>

                                              <geom:Point x="0.5" y="0.5"/>

                                    </transformationPoint>

                          </Source>

                </source>

       

       

                <Keyframe index="0" tweenSnap="true">

                          <tweens>

                                    <SimpleEase ease="0"/>

                          </tweens>

                </Keyframe>

       

       

                <Keyframe index="11" tweenSnap="true" x="126" y="189" scaleX="1.4166666666666667" scaleY="1.4837209302325582">

                          <tweens>

                                    <SimpleEase ease="0"/>

                          </tweens>

                </Keyframe>

       

       

                <Keyframe index="22" tweenSnap="true" x="321.95" y="10" rotation="-30">

                          <tweens>

                                    <SimpleEase ease="0"/>

                          </tweens>

                </Keyframe>

       

       

                <Keyframe index="29" rotation="-75"/>

       

      </Motion>

      ===========================

      it's kind of what I want, however, the command can just be applyed to one (scene or symbol)'s one layer, it can not export all layers of all (scene & symbol)'s motion info to one file. it just can not export the motion just as what xfl is.

       

      so the question is : can xfl save as the format of "export xml motion" is?

       

      3. is there any way to config flash software's xfl format when it save?

       

      thanks! waiting for your reply.