Copy link to clipboard
Copied
After upgrading to Animate CC from Flash 2.0 and trying to run our re-exporter I noticed that a lot of the time the element.width and element.left sometimes have some bad values in them. Strangely element.height and element.top do not seem to contain such bad values.
Is there a work around for this or a patch?
I noticed there was thread from 2014 but it was marked answered but without a satisfactory outcome.
Thanks!
- alia
I have a work around! I noticed that if you click on a frame that section gets valid values. Such an odd way to do things!
So the workaround is to force the current frame / selection elements before you access their data!
...
// Need to make sure we set the frame or the data is corrupt
fl.getDocumentDOM().getTimeline().currentFrame = frame_idx;
var frame = layer.frames[frame_idx]
if (frame)
{
var elements = frame.elements
Copy link to clipboard
Copied
are those symbols or shapes?
with shapes, you'll get one element returned by the jsfl.
Copy link to clipboard
Copied
Symbols
Copy link to clipboard
Copied
i don't see a problem.
what are the minimum steps needed to display the problem?
Copy link to clipboard
Copied
As in you can get element.width and element.left to not sometimes be broken? or you don't see that I could have a problem?
Copy link to clipboard
Copied
I wish I could just upload the old and new flash files to show the difference
Copy link to clipboard
Copied
i don't a problem: width,height,left.top all work as expected for me except for shapes where i see as more than one individual shape, jsfl only sees one shape. it reports accurate data about that one shape but it's unexpected (by me) that it would fail to see several shapes/elements.
Copy link to clipboard
Copied
My problem has not been resolved. Why is this marked correct?
Copy link to clipboard
Copied
it's not marked correct.
Copy link to clipboard
Copied
It was, i figured out how to unmark it. Strange procedure that.
Copy link to clipboard
Copied
again, what are the minimum steps needed to display the problem?
Copy link to clipboard
Copied
So far this is the path (ill get the artists to make a brand new file in animate cc that isnt imported)
Copy link to clipboard
Copied
Is your issue similar to the one reported here? Re: element bounds in JSFL script
Copy link to clipboard
Copied
that's an issue? the guy's trying to measure a tween that contains a bitmap?
i sure hope no one's working on that.
Copy link to clipboard
Copied
Hi kglad,
Am not an expert. From what I know, the team is investigating the issue. I will share your feedback with the team.
Thanks,
Preran
Copy link to clipboard
Copied
kglad wrote:
that's an issue? the guy's trying to measure a tween that contains a bitmap?
i sure hope no one's working on that.
Why do you hope that?
Copy link to clipboard
Copied
1. it makes no sense to check top or left of anything that's not on-stage.
2. it makes no sense to check anything like top,left,width or height of a tween.
Copy link to clipboard
Copied
Strange, we use the element.left element.width for calculating the bounding box and until the upgrade it worked fine. So maybe in their case it doesn't make sense. I'm assuming that's what you are talking about since i cant see which message you are replying to, it does beg the question though, if the element is there why isn't it data filled in.
I'd propose that it makes sense when it previously worked however.
I can't seem to find any updated JSFL API documentation for Animate CC, any place I should be looking? Its probable that the API has changed significantly in the meantime too.
Copy link to clipboard
Copied
most of the recent responses have been to preran. i don't know if you see this, but if you do you can determine who's responding to whom:
Copy link to clipboard
Copied
Preran​ yup seems like same outcome
Copy link to clipboard
Copied
Hi all,
I checked with the team. They tell me that this is a bug they are investigating for a fix in a future update. Stay tuned.
Sorry it took me so long.
Thanks,
Preran
Copy link to clipboard
Copied
I have a work around! I noticed that if you click on a frame that section gets valid values. Such an odd way to do things!
So the workaround is to force the current frame / selection elements before you access their data!
// Need to make sure we set the frame or the data is corrupt
fl.getDocumentDOM().getTimeline().currentFrame = frame_idx;
var frame = layer.frames[frame_idx]
if (frame)
{
var elements = frame.elements
var num_elem = frame.elements.length
// Need to make sure we set the selection or the data is corrupt
fl.getDocumentDOM().selection = elements;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now