Skip to main content
Participating Frequently
February 23, 2022
Question

apostrophe in a ComboBox, HTML5 CANVAS

  • February 23, 2022
  • 1 reply
  • 252 views

When using a combobox in animate, you cannot use the apostrophe. If I write as label "Tom's train", the result will be
"Tom" + "'" + “train” .
Is this an Animate bug?
Thanks for your help.

This topic has been closed for replies.

1 reply

JoãoCésar17023019
Community Expert
Community Expert
February 23, 2022

Hi.

 

It's because Animate uses single quotes in the output so it replaces the apostrophe character by the HTML entity '.

 

One possible solution is to change the item you want at runtime. Like this:

stage.on("drawend", function()
{
	var combobox = document.getElementById("yourComboBoxID");
	combobox.options[0].textContent = "Tom's train";
}, this, true);

 

I hope it helps.

 

Regards,

JC

micraultAuthor
Participating Frequently
March 3, 2022

Thanks very much. Your command works perfectly.
But it's a pity that in the properties of the combobox the apostrohe was not provided while for other ASCCI characters this is not a problem.

 

JoãoCésar17023019
Community Expert
Community Expert
March 3, 2022

You're welcome.

 

Yeah, the IDE should have a solution for this.

 

Please suggest this improvement to the team here:

https://www.adobe.com/products/wishform.html

 

Regards,

JC