简体   繁体   中英

Create tooltip on symbol with Adobe Animate CC HTML5

I've create a couple of symbols(buttons) in HTML5 Canvas project in adobe animate, each button triggers an action, i want to create tooltips for these buttons so they would describe what will happen if you press them.
For symbol with instance name "InstanceOne" i've tried something like this:

this.InstanceOne.attr('title', 'Test tooltip');

but it seems there's no attr function for symbols.Is there a quick way to create tooltips via adobe animate or do i need to use mouseover and mouseout events(no idea how to do that)?

No, the code you have written is applicable for HTML DOM elements, not Canvas elements. Normally, you'll have to handle it manually using mouseover itself.

One easy option is to keep your symbol inside a Button symbol, and add the tooltip on over state in the button timeline itself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM