I created a Flash file (for SWFs) using Flash Pro CC. This project contains a particular Movieclip component with external AS3 Linkage. I say "particular" because, as far as I have seen, this problem has occurred with only this one component. Others work fine.
After saving and publishing in Flash Pro CC, it works fine. The swf works as expected.
Then I get this problem when I open the same .fla file in Adobe Animate. The Output window gives me the following message:
Warnings generated while copying/importing in [FLA file]:
* HTML5 Components cannot be imported in Flash Document.
And the component doesn't show up. More specifically, there's something on the stage, but none of the pieces are visible. As a side effect to this, when I type
trace(this.totalFrames) on the parent timeline and attempt to run it, the value is 1 too high. E.g. If the timeline has 20 frames, the output window will tell me there are 21 frames.
All I know about this component that's different from the others I've defined is that it's a movieclip that contains buttons, but I don't see how that would be a problem. Is there something I can at least do to work around this? I'd like to make it forward compatible if possible.
Also, what does this have to do with HTML5? This is purely a SWF thing.
There are now HTML5 components, and those are packaged in a particular way. Here's an article about making them:
The error you're seeing suggests that the AS3 component you're trying has been made in a way that makes it seem like it's an HTML5 component. You could look at how it is setup to see if you can tell why it appears to be HTML5. Or you could use Flash Pro, or an earlier version of Animate, before there were HTML5 components.
Is the component freely available, so we could look at it too?
No, unfortunately, I can't show it for work reasons. We do have both Flash Pro and Animate, and we're trying to make the transition to Animate, but we're getting hung up on a few issues like this one. All it is is a timeline controller. It's a row of buttons rolled into a movieclip, each of which you can click on and it will manipulate the timeline (play, pause, skip, etc.).
Rebuilding the component in Animate works, too. I took all the assets, combined them into the movieclip, and linked the clip to the same AS3 class file. After removing the component from the original (because just opening it in Animate will cause the too many frames issue I mentioned earlier), I saved and published it in Flash Pro, opened the modified fla in Animate, imported the new version, and it works as intended. The problem then is that it loses all the component definitions in the Properties panel, and then there's no way to recover it without making a backup and keeping that open in Flash Pro.
Is there anything that might cause certain AS3/Flash components to "look" like HTML5 components to Animate but not others? There are no JSON or .js sources anywhere. Could it be because it's a symbol contained in another symbol?
I've asked if someone on the Animate team can pop by to make suggestions.
I need your help to understand the issue that your facing in detail. I have sent you a PM requesting more details, could you please check the same and respond back?
Copy link to clipboard
Thanks all for your help. I came up with a workaround, so I'll share my investigations and solution here.
The first thing I tried to do, since I'm not allowed to post any files, was recreate the problem and post the steps here. However, when I recreated the fla from scratch in Flash Pro (Build 184.108.40.206) to interface with the component definition code file (.as file), much to my surprise, I could open and run in Animate (Build 220.127.116.11). I made buttons with all the correct instance names, put them in the containing movieclip, linked and validated it, and it worked.
So then, as a next step, I tried the following:
And that was all I had to do. This tells me that the problem exists in the original containing movieclip and not in the AS3 code or the buttons. However, when I examined either one, I couldn't find anything that could be causing the problems. I tried duplicating the symbol as well, which didn't work.
Upon further investigation at work, I found out that the original was actually created in CS6, which may the problem, but we don't have CS6 anymore, so I can't find out for sure. Oh, well. It's a better solution than I had before. I don't have to create a backup anymore, and it preserves all the component properties when swapped out.
Some features were removed after CS6. It could be that the component was using TLF text fields, and recreating it made it use regular textfields.
Oh, hey. I remember posting this! Eventually I think we found the problem like this:
Unfortunately, by the time we discovered this, we already found the workaround.