• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

HTML5 code snippets placed on buttons not working when published but do work while testing inside Animate CC.

Community Beginner ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

What step am I missing to make this function work? The snippets I am using are "click to go to frame and stop". When published, these buttons are not taking me to a new frame. I have the latest version of Animate CC and am using OS 10.11.6. Please help.

Views

6.8K

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
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 10, 2017 Apr 10, 2017

It looks like the error only happens in Chrome. The problem seems to be when there is a bitmap that is inside a button. You could get the same effect by having a button that only has a hit area frame, and sit that on top of the bitmap. That seems to solve the errors in Chrome.

Votes

Translate

Translate
LEGEND ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Look in the browser developer console to see if there are any errors. It could be that you're testing as local files, and that has different security conditions than when you're testing from Animate. If the files are due to be used online, try putting them online now, that would then be the same security conditions.

Votes

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
community guidelines
Advocate ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

By default if you publish HTML Canvas banner it usses hosted JavaScript Library - it may leads to problems with preview

Try in Publish Settings window and use Advanced Tab and here uncheck Hosted Libraries option.

Publish your work again - maybe it helps?

Pawel

Votes

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
community guidelines
Community Beginner ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

macpawel thank you too for your input!

Votes

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
community guidelines
Community Beginner ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Thanks Colin,

Here is the error that I am getting:

WARNINGS:

** 5 Bitmaps packed successfully into 1 spritesheet(s).

Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (4)

Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.

You suggest I "try putting them online".. how do I go about doing this??

macpawel,

I also tried what you suggested and am having the same issue..

Thank you both for your quick responses!!

Votes

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
community guidelines
LEGEND ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Will these files be used on your web site some day? If they are to be, how do you normally upload files?

Votes

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
community guidelines
Community Beginner ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Its final deliverable will be a presentation (a one-to-one sales tool), essentially a native app. It will not, however, be connected to a website.

Votes

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
community guidelines
Community Beginner ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

I want to be able to send the client the folder of assets and they open the presentation via the .html file into a browser (internet connection not needed). In the past, using Flash, I've sent either an .exe file or the .swf file to the client for these types of presentations. I'm hoping to do the same now with an .html file so that it can be viewed on any mobile device. (I'm basically creating a interactive presentation with buttons to go to other pages and to play videos).

Votes

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
community guidelines
LEGEND ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

By the way, the errors you showed were inside Animate. The error console I mentioned would be in your browser, under the developer tools. Typically you can get there by right-clicking and choosing Inspect. Once all the developer tabs are showing look for the one named Console.

Votes

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
community guidelines
Community Beginner ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Gotcha! Thanks, ok.. Here's what I'm getting - lots of errors, here's what they all tend to look like:

Lirie-Errors.png

Votes

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
community guidelines
LEGEND ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

It looks like the error only happens in Chrome. The problem seems to be when there is a bitmap that is inside a button. You could get the same effect by having a button that only has a hit area frame, and sit that on top of the bitmap. That seems to solve the errors in Chrome.

Votes

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
community guidelines
Community Beginner ,
Apr 10, 2017 Apr 10, 2017

Copy link to clipboard

Copied

Wow!! Thank you! That worked!
I still get the warning inside Animate stating "Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system." However, no errors in the developer console and my buttons are all now working as expected. Thanks a ton!!! : )

Votes

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
community guidelines
New Here ,
Dec 07, 2020 Dec 07, 2020

Copy link to clipboard

Copied

Hey Uhh my botens work when i click the test button but when i use html it dosn't work any more 

Votes

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
community guidelines
Community Beginner ,
Mar 21, 2022 Mar 21, 2022

Copy link to clipboard

Copied

Thjanks you sopp much. I had same isise. It worked in test, then didnt after publish. Bitmaps in the buttoins. Adding a round vector shape to the hit bit of the button the fixed it! Using chrome of course. 🙂

Votes

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
community guidelines
Community Beginner ,
Mar 21, 2022 Mar 21, 2022

Copy link to clipboard

Copied

Hi there, I also found this issue affected playback in chroime of bitmap buttons: In the publish settings for animate: export images as "image assets". Default was textures for some reason.

 

Votes

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
community guidelines
Community Beginner ,
Jan 24, 2023 Jan 24, 2023

Copy link to clipboard

Copied

LATEST

Thanks Manxman123.  I turned off exporting image assets and everything works on my file now. I have buttons that togggle visability of other items.  They only worked in test, but now they work on the actual exported files too.

Votes

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
community guidelines