Copy link to clipboard
Copied
I am extremely new to Animate and have made one animation that worked fine before this. When I test my animation inside of Animate it brings up my browser but shows a blank screen. When I try to publish the animation and play that, it does open, but it stays stuck on the first frame and the button doesn't work.
When I test in Animate the console says:
"Uncaught (in promise) DOMException: The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully."
I checked the console when I open the published file and it gives me:
"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (insert my file name here) AudioPluginTest.fail. (Reason: CORS request not http)."
and
"Uncaught An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."
Copy link to clipboard
Copied
is this canvas or as3 document?
and, if canvas, what does the developer console say when you use animate to test (control>test movie>in browser). this is going to be very different from opening the published html file with your browser and then checking the console (which you expect to give the message your reported).
Copy link to clipboard
Copied
It's a canvas document. Animate gives me "Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (5)" and
"Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system."
I asked for help from my professor and she says the project works perfectly fine both testing and publishing wise, so I don't understand why it doesn't work for me?
Copy link to clipboard
Copied
There are publish settings that control whether the images are saved seperately as individual files, or combined into a sprite sheet or texture map. Either of those two settings have tougher security options. It could be that you're testing and using a sprite sheet, and your professor is testing with individual image files.
Copy link to clipboard
Copied
i'm going to disagree with @Colin Holgate which is risky because he's usually correct, but i'm going to hedge my bets and acknowledge he may be correct.
but a more common cause (i think) of those errors would caused by testing from your local file system.
ie, what happens if you use animate (control>test movie>in browser) to test? do you still see that cross-origin request error?
Copy link to clipboard
Copied
I don't get the cross-origin request error when I use (control>test movie>in browser). I just get the "Uncaught (in promise) DOMException: The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully."
Copy link to clipboard
Copied
are you using any code in your project or any components?
Copy link to clipboard
Copied
I have code to stop the animation and buttons to keep playing it at different places on the timeline.
Copy link to clipboard
Copied
there's no sound???
Copy link to clipboard
Copied
It does have sound. The buttons are supposed to make a sound when clicked.
Copy link to clipboard
Copied
that's the problem.
explain how you use the sound. eg, file type, is it imported or loaded etc
Copy link to clipboard
Copied
I imported the sound as a wav file to the library. I added it to the button by dragging it from the library onto the 'down' frame in the symbol editior. It seems to play fine when I click play on the button's timeline
Copy link to clipboard
Copied
open the wav file in audition and save with 16 bit, 44.1 kHz sample rate. swap your current sound for the newly saved from audition one.
Copy link to clipboard
Copied
I tried this and it still doesn't work. Do I need to remove the old sounds from the library as well or does that not matter?
Copy link to clipboard
Copied
you need to replace the problematic library sounds with ones edited in audition.