Skip to main content
Participant
April 2, 2023
Question

How to run a javascript from actions of adobe animate html5 project?

  • April 2, 2023
  • 1 reply
  • 552 views

Hello everyone. Im trying to understand how to run this java code to run ad from adobe animate actions panel. I meen there is something like a gate from run this script from actions panel of html5 adobe aniate project to this script wich i can add later to html5 page after publish from animate?

ysdk.adv.showRewardedVideo({
    callbacks: {
        onOpen: () => {
          console.log('Video ad open.');
        },
        onRewarded: () => {
          console.log('Rewarded!');
        },
        onClose: () => {
          console.log('Video ad closed.');
        }, 
        onError: (e) => {
          console.log('Error while open video ad:', e);
        }
    }
})
    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    April 2, 2023

    you can use lamba functions in animate, if that's what you're asking.

    Participant
    April 2, 2023

    I dont know. I want to run this javascript from middle of game project.

    kglad
    Community Expert
    Community Expert
    April 2, 2023

    that snippet is incomplete.  at a minimum, you have to include the showrewardedvideo function