Jump to content
Search Community

exportItemXML not working (or I am using it wrong)?

tomato test
Moderator Tag

Recommended Posts

I am trying to use "exportItemXML" with TM VERSION: 1.9669 – it is not working.

 

In a test project, I load in some movieClips and then call the trace statements below. The Console output is at bottom.

 

- the movieClips exist and are managed by my TransformManager instance

- the exportFullXML command works

 

Am I using "exportItemXML" wrong? Or is this a bug?

            trace("objects", manager.targetObjects);
            trace("xml?", manager.exportItemXML(manager.targetObjects[1]));
            trace("single object", manager.targetObjects[1]);
            trace("all xml", manager.exportFullXML());
            
            var xml:XML = manager.exportItemXML(manager.targetObjects[1]);
            trace("xml??", xml);

Console output

objects [object MovieClip],[object MovieClip],[object MovieClip]
xml?
single object [object MovieClip]
all xml <transformManager>
  <settings allowDelete="0" allowMultiSelect="1" autoDeselect="1" constrainScale="1" lockScale="0" scaleFromCenter="0" lockRotation="0" lockPosition="0" arrowKeysMove="1" forceSelectionToFront="1" lineColor="3381759" handleColor="16777215" handleSize="8" paddingForRotation="12" hideCenterHandle="0" hasBounds="0"/>
  <items>
    <item name="red" level="0" a="1" b="0" c="0" d="1" tx="100" ty="100" xOffset="0" yOffset="0" rawWidth="100" rawHeight="100" scaleMode="scaleNormal" hasSelectableText="0" minScaleX="-Infinity" maxScaleX="Infinity" minScaleY="-Infinity" maxScaleY="Infinity"/>
    <item name="blue" level="1" a="1" b="0" c="0" d="1" tx="400" ty="100" xOffset="0" yOffset="0" rawWidth="100" rawHeight="100" scaleMode="scaleNormal" hasSelectableText="0" minScaleX="-Infinity" maxScaleX="Infinity" minScaleY="-Infinity" maxScaleY="Infinity"/>
    <item name="green" level="2" a="1" b="0" c="0" d="1" tx="700" ty="100" xOffset="0" yOffset="0" rawWidth="100" rawHeight="100" scaleMode="scaleNormal" hasSelectableText="0" minScaleX="-Infinity" maxScaleX="Infinity" minScaleY="-Infinity" maxScaleY="Infinity"/>
  </items>
</transformManager>
xml??
Link to comment
Share on other sites

OK -  was able to get a result using "toXMLString" – what I found off is that "exportFullXML" apparently returns a stringified version of the XML.

            var xml:XML = manager.exportItemXML(manager.targetObjects[1]);
            trace("xml??", xml.toXMLString());
  • Like 1
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.
×
×
  • Create New...