I am doing an interactive animation project in school using Adobe Animate. Everything works when I test it out (Ctrl + Enter), but when I export movie, I get a bunch of compiler errors saying what's in the subject line. I will attach a screenshot of the compiler error window and the actions tab of one of the frames that is referred in the list. All of the actions use the same code that was brought by the wizard.
Go to File > Convert To > HTML5 Canvas.
All the code will be commented out so just uncomment it.
It already is an HTML5 canvas. The filename in the screenshot above the stage shows a little bit of that.
It's strange because there's no compiler errors in HTML5 Canvas documents.
Can you upload another screenshot showing the whole window?
upload the fla to a file server and post a link.
I've never done that before. What file server do you recommend?
i don't see an error when publishing. in fact, the published files look like they work as expected:
close and reopen animate and republish. if that fails, restart your computer and republish.
I also didn't get any error.
Besides of what kglad told, I think the reason may be the version of your Animate. Are you using a version that is older than the current one (21.0.3)?
Thank you kglad for posting your publish so I can see for myself. This makes me wonder though. Are your publish settings different than mine? If not, then I won't worry about it anymore but I'm just curious.
Joao, my copy of Animate's version is 21.0.3. That is the same version that the file I put in dropbox was saved on.
i didn't change publish settings (except to rename the file):
i assume you're not seeing those errors any longer, correct?
I didn't see the errors when I published, but I think that's where the problem lies. I wasn't publishing originally, I was exporting a movie. That's when the compiler errors came up.
Now I'm noticing a problem with my published HTML document that my buttons aren't doing anything. My cursor doesn't change from an arrow to a pointing hand either and I'm not getting any audio.
if you export a bitmap sequence there shouldn't be a problem, but if you export a swf you're essentially publishing an as3 and that explains the errors.
do you see any of those problems with the files i publishing and linked in a previous message?
are you seeing those problems when testing in animate (where everything should work) or when opening the html on you local computer (where you can expect those problems because of cross-domain security issues)?
So the link of the animation you posted worked fine the first time I clicked on it, but every other time after that, the song that plays at the beginning wouldn't play anymore, yet every other sound clip and song that I added to it played just fine. The buttons also work fine as well.
you probably need to clear your cached files.
anyway, is everything working on your end?
Yeah, everything is working ok. The buttons work fine now, but the music at the beginning is still not playing properly. (It starts later than it's supposed to)
I just tried clearing the publish cache and ran another test, it didn't fix the issue with the audio starting at the wrong time. Is there another cache I'm supposed to clear?
nothing to clear when testing in animate.
try changing your sound's sync setting (to stream if you want it sync'd with your timeline).
I tried changing to stream, but it still didn't play properly and only played when I clicked one of the movie's buttons.
does the sound play fully when you test in the fla's library?
Yes, and it plays properly when I play from the timeline. Just in a playtest, it starts playing when Mario starts jumping down the stairs, and when I publish it, it doesn't play at all. All the other audio plays fine except for that song.
if it plays fully in the timeline and when the timeline moves, but you want it to start playing when the page loads you should reset its sync property back to "event" start the sound on frame 2 of the main timeline and make sure frame 2 plays when your files load. ie, no this.stop() in frame 1.
I've tried that before as well.
I uploaded the latest save to my dropbox again. As I have tried everything you've suggested thus far, I feel you looking at it and seeing for yourself might show you what's happening exactly.
Playing the timeline, running a playtest and publishing have given me different results. Let me know if you're getting the same thing.
i don't normally download and correct files unless i'm hired. sometimes i do so when an issue intrigues me.
like @JoãoCésar i couldn't believe you were seeing an actionscript error message when publishing for html5. that's why i initially downloaded your fla.
the sound issue you're having doesn't interest me enough to work on it gratis. if you want to hire me, let me know.
other options are to wait to see if someone else will download and work on it for you or to google the problem and see what others have done.