Highlighted

Adobe Animate HTML/Canvas is changing dynamic my text fields setTransform property on export, causing the text to change position.

New Here ,
Dec 12, 2018

Copy link to clipboard

Copied

I have been noticing that my dynamic text fields are not showing up where they are supposed to be.

For example:

I have a dynamic text field on the stage. It's X and Y are X=280 and Y=20 when viewing the dynamic text fields properties via the Animate properties panel.

After I export, and find that text box in the exported JS file. The text fields setTransform X and Y values have been altered by 2.

So instead of reading

this.intro_txt.setTransform(280,20);

it actually reads

this.intro_txt.setTransform(282,22);

I can manually modify the value of X and Y to get it to line up where it needs to go, but solution is way too tedious to be an option.

I could also modify where the text is placed on the stage, but then I'll run into an issue of the text being off if this is indeed a software bug that is fixed.

I can't figure out why this is happening.

Thoughts?

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

I see what you mean. That's odd. I guess positioning of canvas text varies so much between browsers that I never noticed before. It's not really possible to do precise text positioning that will look the same on all browsers.

TOPICS
Discussions

Views

71

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Adobe Animate HTML/Canvas is changing dynamic my text fields setTransform property on export, causing the text to change position.

New Here ,
Dec 12, 2018

Copy link to clipboard

Copied

I have been noticing that my dynamic text fields are not showing up where they are supposed to be.

For example:

I have a dynamic text field on the stage. It's X and Y are X=280 and Y=20 when viewing the dynamic text fields properties via the Animate properties panel.

After I export, and find that text box in the exported JS file. The text fields setTransform X and Y values have been altered by 2.

So instead of reading

this.intro_txt.setTransform(280,20);

it actually reads

this.intro_txt.setTransform(282,22);

I can manually modify the value of X and Y to get it to line up where it needs to go, but solution is way too tedious to be an option.

I could also modify where the text is placed on the stage, but then I'll run into an issue of the text being off if this is indeed a software bug that is fixed.

I can't figure out why this is happening.

Thoughts?

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

I see what you mean. That's odd. I guess positioning of canvas text varies so much between browsers that I never noticed before. It's not really possible to do precise text positioning that will look the same on all browsers.

TOPICS
Discussions

Views

72

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 12, 2018 0
Adobe Community Professional ,
Dec 12, 2018

Copy link to clipboard

Copied

You don't have smart layers or the camera enabled, do you?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2018 0
New Here ,
Dec 12, 2018

Copy link to clipboard

Copied

No. I am not using Advanced layers. The camera is not enabled.

Essentially you can easily recreate the same issue.

Create a new blank canvas doc. Create a simple dynamic text field. Place it at (0,0). Export and look in the js code to see if the box has it's setTransform at (0,0) or (2,2).

It exports as (2,2) for me.

I can't figure out why.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2018 0
Adobe Community Professional ,
Dec 12, 2018

Copy link to clipboard

Copied

I see what you mean. That's odd. I guess positioning of canvas text varies so much between browsers that I never noticed before. It's not really possible to do precise text positioning that will look the same on all browsers.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 12, 2018 0