简体   繁体   中英

Accessing external JS functions in Adobe Animate CC

In my Animate CC file I can handle the loading of external js files, but am struggling to understand how you access the functions in those external files from the timeline? For example, if my external script has:

function videoPlay() {
    alert("Hello! I am some code!");
}

How would I call that function from a keyframe on the timeline?

this.videoPlay(); or _root.videoPlay(); does not work

videoPlay(); is the correct way to call the method. I had an issue elsewhere in the code where I did not implicitly call this. on a variable.

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