Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
code-by

Help convert fxl to greensock tween

Recommended Posts

Hello! I have flash animation, when I export it to xfl, the following xml need to convert into tween animation, anybody could help ? Thank you )

<DOMSymbolItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ns.adobe.com/xfl/2008/" name="Totem2" itemID="5465090b-000000b0" lastModified="1415907618">
  <timeline>
    <DOMTimeline name="Totem2">
      <layers>
        <DOMLayer name="Layer 1" color="#4F80FF" current="true" isSelected="true">
          <frames>
            <DOMFrame index="0" duration="5" tweenType="motion" motionTweenSnap="true" keyMode="22017">
              <elements>
                <DOMSymbolInstance libraryItemName="Totem2a" selected="true">
                  <matrix>
                    <Matrix tx="-59.05" ty="-52"/>
                  </matrix>
                  <transformationPoint>
                    <Point x="41" y="51.75"/>
                  </transformationPoint>
                </DOMSymbolInstance>
              </elements>
            </DOMFrame>
            <DOMFrame index="5" duration="4" tweenType="motion" motionTweenSnap="true" keyMode="22017">
              <elements>
                <DOMSymbolInstance libraryItemName="Totem2a" selected="true">
                  <matrix>
                    <Matrix a="0.93658447265625" tx="-56.45" ty="-53.75"/>
                  </matrix>
                  <transformationPoint>
                    <Point x="41" y="51.75"/>
                  </transformationPoint>
                </DOMSymbolInstance>
              </elements>
            </DOMFrame>
            <DOMFrame index="9" duration="4" tweenType="motion" motionTweenSnap="true" keyMode="22017">
              <elements>
                <DOMSymbolInstance libraryItemName="Totem2a" selected="true">
                  <matrix>
                    <Matrix a="0.999053955078125" b="-0.043487548828125" c="0.043487548828125" d="0.999053955078125" tx="-61.25" ty="-50.2"/>
                  </matrix>
                  <transformationPoint>
                    <Point x="41" y="51.8"/>
                  </transformationPoint>
                </DOMSymbolInstance>
              </elements>
            </DOMFrame>
            <DOMFrame index="13" duration="4" tweenType="motion" motionTweenSnap="true" keyMode="22017">
              <elements>
                <DOMSymbolInstance libraryItemName="Totem2a">
                  <matrix>
                    <Matrix a="0.9981689453125" b="0.0604400634765625" c="-0.0604400634765625" d="0.9981689453125" tx="-55.8" ty="-54.35"/>
                  </matrix>
                  <transformationPoint>
                    <Point x="40.95" y="51.7"/>
                  </transformationPoint>
                </DOMSymbolInstance>
              </elements>
            </DOMFrame>
            <DOMFrame index="17" tweenType="motion" motionTweenSnap="true" keyMode="22017">
              <elements>
                <DOMSymbolInstance libraryItemName="Totem2a">
                  <matrix>
                    <Matrix tx="-59.05" ty="-52"/>
                  </matrix>
                  <transformationPoint>
                    <Point x="41" y="51.75"/>
                  </transformationPoint>
                </DOMSymbolInstance>
              </elements>
            </DOMFrame>
            <DOMFrame index="18" keyMode="9728">
              <elements>
                <DOMSymbolInstance libraryItemName="Totem2a">
                  <matrix>
                    <Matrix tx="-59.05" ty="-52"/>
                  </matrix>
                  <transformationPoint>
                    <Point x="41" y="31"/>
                  </transformationPoint>
                </DOMSymbolInstance>
              </elements>
            </DOMFrame>
          </frames>
        </DOMLayer>
      </layers>
    </DOMTimeline>
  </timeline>
</DOMSymbolItem>
Link to comment
Share on other sites

Sorry, I'm not familiar with FXL or the intricacies involved in converting it to regular ActionScript tweens, but if you have any GSAP-specific questions we'd be happy to help. 

Link to comment
Share on other sites

sorry, format is xfl (flash export).

how to specify rotation point of object?

<transformationPoint>
<Point x="41" y="51.75"/>
</transformationPoint>
Link to comment
Share on other sites

You have three choices:

  1. Use the TransformAroundPointPlugin which is a membership benefit of Club GreenSock and allows you to define pretty much any point as the origin for transformations regardless of the "real" registration point
  2. Alter the DisplayObject so that the registration point is in the correct spot
  3. Wrap the DisplayObject in a Sprite and offset it such that the registration point is where you need it to be. 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×