Skip to main content
Participant
Apr 2, 2023 8:32 AM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

    7 replies

    kglad
    Community Expert
    Community Expert
    Apr 2, 2023 2:06 PM UTC

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

    Translate
    Participant
    Apr 2, 2023 2:51 PM UTC

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

    Translate
    kglad
    Community Expert
    Community Expert
    Apr 2, 2023 3:02 PM UTC

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

    Translate