[SOLVED] How do I use CallJS Plugin with a Button Event?

0 favourites
  • 4 posts
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • I currently have installed the CallJS plugin.

    I have the following components:

      Text Box Button CallJS AJAX

    The Layout looks like this:

    The Events look like this:

    The following is the Javascript myScripts.js:

    function test() {
        return "Testing CallJS.";
    }
    [/code:1ge56lty]
    
    The [b]myScripts.js[/b] resides in the same directory as the [b]index.html[/b] file.
    
    After [b]Run layout[/b] the page is displayed correctly and I expect the text to be returned in the Text Box, but the [b]button does nothing[/b].
    
    Thanks for taking a look.
    
    [b]SOLUTION: [/b]The [b]CallJS Plugin [/b]does [b]NOT[/b] work in [b]Preview mode[/b].
  • I looked at the plugin thread, and I may ask:

    Did you set the callJS plugin correctly?

    Also, it will not work in preview if I understand correctly.

    link to the plugin if anyoke wants to help.

    I am not in front of C2 so I cannot try things out currently, also, the plugin seems to be not global, so I am not sure if it should be included in all layouts

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks.

    Got all excited and didn't read the "Not Working in Preview Mode" part.

  • Have you tried adding your JS file to your project ? I wonder if the basic ExecJS from Browser could work too that way ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)