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

Get help using Construct 2

Post » Tue Sep 30, 2014 8:05 am

I currently have installed the CallJS plugin.

I have the following components:
    Text Box
    Button
    CallJS
    AJAX

The Layout looks like this:
Image

The Events look like this:
Image

The following is the Javascript myScripts.js:
Code: Select all
function test() {
    return "Testing CallJS.";
}


The myScripts.js resides in the same directory as the index.html file.

After Run layout the page is displayed correctly and I expect the text to be returned in the Text Box, but the button does nothing.

Thanks for taking a look.

SOLUTION: The CallJS Plugin does NOT work in Preview mode.
Last edited by Vanguard on Tue Sep 30, 2014 11:53 pm, edited 1 time in total.
B
3
Posts: 4
Reputation: 183

Post » Tue Sep 30, 2014 8:20 am

I looked at the plugin thread, and I may ask:

Did you set the callJS plugin correctly?

Image

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

plugin-call-javascript_t64104 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
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Tue Sep 30, 2014 11:52 pm

Thanks.

Got all excited and didn't read the "Not Working in Preview Mode" part.
B
3
Posts: 4
Reputation: 183

Post » Wed Oct 01, 2014 12:22 am

Have you tried adding your JS file to your project ? I wonder if the basic ExecJS from Browser could work too that way ?
B
74
S
31
G
26
Posts: 994
Reputation: 20,198


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 60 guests