Copy link to clipboard
Copied
Hi!
I have a problem, where if a textfield is created and it is resized, by grabbing the left/top part of the textfield, it will change the textfields position relative to it's own registration point. But in Animate CC, there is no indication of this. It only comes apparent if you try to scale the text, since it will no longer scale towards the top left corner of the text field, but instead to where the ORIGINAL top left of the text field was.
Once a text field is modified like this, there seems to be no way to fix it...
Saving the document in xfl, and comparing textfields, it is apparent that a textfield resized from the left/top has extra properties on it (named left/top), and the transformation matrix is off by the same amount to compensate. But there is no way to normalize this, not even from jsfl. document.setTextRectangle only changes the width/height no matter what left/top property I use for the bounding box.
Example of "normal" text field:
<DOMDynamicText name="textAmountActions" selected="true" width="60.25" height="27.05" includeOutlines="true" isSelectable="false" lineType="multiline no wrap">
<matrix>
<Matrix tx="-170" ty="-1"/>
</matrix>
<textRuns>
<DOMTextRun>
<characters>99/99</characters>
<textAttrs>
<DOMTextAttrs alignment="center" aliasText="false" autoKern="false" lineSpacing="0" lineHeight="27.05" size="20" bitmapSize="400" face="GroboldovFont*" fillColor="#333333"/>
</textAttrs>
</DOMTextRun>
</textRuns>
<filters>
<GlowFilter color="#FFFFFF" strength="5"/>
</filters>
</DOMDynamicText>
Example of a text field with changed registration point:
<DOMDynamicText name="textAmountItemReward" left="100.8" width="45.2" height="27.05" includeOutlines="true" isSelectable="false">
<matrix>
<Matrix tx="-102"/>
</matrix>
<textRuns>
<DOMTextRun>
<characters>000</characters>
<textAttrs>
<DOMTextAttrs alignment="center" aliasText="false" autoKern="false" lineSpacing="0" lineHeight="27.05" size="20" bitmapSize="400" face="GroboldovFont*" fillColor="#FFFFFF"/>
</textAttrs>
</DOMTextRun>
</textRuns>
<filters>
<DropShadowFilter blurX="0" blurY="0" distance="2"/>
</filters>
</DOMDynamicText>
Copy link to clipboard
Copied
always resize from the bottom right.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now