Copy link to clipboard
Copied
Animate HTML5. I have a library symbol and an instance of it on the parent. The symbol contains a JS function. How do I call the function from a script on the parent?. Symbols on AS3 have an option “export for ActionScript” . I do not find anything similar on HTML5 symbols.
The same way you access anything else in Animate. If your instance is named "foo" and your function is named "bar" just do:
this.foo.bar();
Of course, this only works if your function is defined as a method of the instance:
this.bar = function() {
// bla bla bla
}
Copy link to clipboard
Copied
The same way you access anything else in Animate. If your instance is named "foo" and your function is named "bar" just do:
this.foo.bar();
Of course, this only works if your function is defined as a method of the instance:
this.bar = function() {
// bla bla bla
}
Copy link to clipboard
Copied
Thank you for your help. Problem solved.
I followed your instructions and found out that the instance function can not be called while the page is loading. I moved the calling to frame 20 and it worked fine.
I understand you get points on this help. How should I proceed for you getting them?
Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10
Copy link to clipboard
Copied
Just click the button under whichever post you think is the correct answer.
Copy link to clipboard
Copied
Sorry, the Correct Answer button does not show on my screen. All our transactions are there but the button or something similar. The reason may be that I am in Argentina. This happened to me before and would like to correct it. A sugestion?
Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10
Copy link to clipboard
Copied
Hi.
I marked Clay's answer as the correct one for you.
Regards,
JC