Copy link to clipboard
Copied
I need a Component Button (ui-button) to toggle the visibility of an instance, as opposed to a mc button instance.
This code works fine with a mc button instance, but is ignored by a Component Button with instance name Line_Toggle:
this.Line_Toggle.addEventListener("click", fl_ClickToHide_2.bind(this));
function fl_ClickToHide_2()
{
if (this.textbox2.visible == true) {
this.textbox2.visible = false;
}
else if (this.textbox2.visible == false){
this.textbox2.visible = true;
}
}
I added the action with the instance named Component Button selected, from the Code Snippets > Actions, to ensure that Animate would add the correct event code for an instance named, Component Button. This was in vain.
Any idea why that did not happen? Any thoughts on how to get this to function?
I appreciate all insight, thanks in advance.
Okay, it seems AnimateCC does not differentiate between what Code Snippets are displayed when particular elements are selected... it has no ability to show available code snippets in selected component context. ...which would be nice.
If I have a Component Button (ui-button) selected, the Code Snippets will allow a user to add a snippet as if any movie clip were selected, even though only the collection for Components > User Interface should be active and selectable in this context.
It doesn't se
Copy link to clipboard
Copied
...as an aside, note to Adobe:
Enough with this useless mandatory Topics Tag 'feature' that offers only completely unrelated options, who thought this was helpful in any way at all? What good is it?
Additional: Holy crap, I added an image of the comical Topics Tag 'feature' pasted from the clipboard, which this new interface flagged as 'Bad HTML' and removed it before I could post... what gives? Why allow an image to be pasted from the clipboard in the first place only to remove it? Did no one test this 'new improved' forum before deploying it? What is the problem with an image pasted from the clipboard, anyway? Why not make life easier for your customers and eliminate these poorly designed 'features' that are only needless hurdles? Why isn't there a forum for sorting out issues with the forum itself?
Copy link to clipboard
Copied
Okay, it seems AnimateCC does not differentiate between what Code Snippets are displayed when particular elements are selected... it has no ability to show available code snippets in selected component context. ...which would be nice.
If I have a Component Button (ui-button) selected, the Code Snippets will allow a user to add a snippet as if any movie clip were selected, even though only the collection for Components > User Interface should be active and selectable in this context.
It doesn't seem like a difficult function to put into their application interface, overlooked somehow. Anyway, this experience with the product may prove useful to other customers who are trying to get things done with a minumum of research, in this case the following code did the trick:
var _this = this;
$('#dom_overlay_container').on('click', '#Line_Toggle', function() {
if (_this.textbox2.visible == true) {
_this.textbox2.visible = false;
}
else if (_this.textbox2.visible == false){
_this.textbox2.visible = true;
}
}.bind(_this));
If _this = this, why not just use 'this' anyway? Is that just a bridge between syntaxes of some kind?