[Plugin] Call Javascript

Post your completed addons to share with the community

Post » Tue Nov 27, 2012 11:33 pm

@lanceal @Thibaut
Try FunctionExt, it works with official function plugin -- call official function defined at event sheet, do some actions, then get return value back.rexrainbow2012-11-27 23:34:16
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Wed Feb 20, 2013 9:50 pm

Is there a way to use a global variable from the game with this code? For example, how do I alert my highScore var?

Or do I have to use something else?

I have got this plugin working, I just don't know how to do the above. Thanks
B
5
Posts: 17
Reputation: 459

Post » Fri Feb 22, 2013 2:14 pm

I have a problem with this plugin and i was wondering if somebody would be able to assist me.
The problem is as follows. The plugin does something that causes data not to be loaded properly. Which means the game either never gets past the loading bar or never loads in all the objects and just some. Also any of the javascript code stops working because of it.

Quick note on this to, you dont actually have to call the plugin anywhere in the event sheets or use any of its functions to make it break loading in a few browsers.

And this only happens on a few mobile phones (wp7 IE9 + android 4.0.4). Now is my question is there any way to fix this and if so what is the fix for this?
I tried the change mentioned by ranma but it had no effect.

Ignore the above.. i was so stupid to use console.log to test.. and completely forgot most modern mobiles do not support it in any way.. *sigh*schippie2013-02-22 14:52:45
B
2
Posts: 9
Reputation: 443

Post » Sun May 05, 2013 8:08 pm

hi guys,

I'm new to construct but I'm struggling using the this plugin.

has anyone got an example of utilizing the external myjs file in ctx format.

I'd appreciate it if anyone could help.
B
3
Posts: 2
Reputation: 179

Post » Sat Jun 22, 2013 3:47 pm

@Joe7 I am starting to learn JavaScript and I habe this lame question:
Can I use an external js library for USB communication ?
I am playing with motors and controllers using USB port directly from web browser and it is working like a charm. Is it possible to send/receive data/text through USB using Construct or I'm dreaming to far?Cipriux2013-06-23 01:14:43
B
64
S
16
G
20
Posts: 471
Reputation: 16,131

Post » Wed Jul 10, 2013 8:05 pm

Hi everyone!
There's a lot of question here that wait for an answer and so i add mine:
building my C2 project with eclipse + phonegap for android i found that calljs plugin added to LowLatencyAudio plugin works perfectly, but not in the case i make a "every x seconds" condition: execute "somewhat". This simply doesn't work on my device (samsung galaxy s2) and on other i try.
so: is there anyone that could and would help me to find a way to solve my problem?
Thank you very much!
(sorry for my english)
B
6
S
2
G
2
Posts: 3
Reputation: 1,589

Post » Wed Nov 20, 2013 1:28 am

@Joe7, I can't seem to be able to downlad the plugin. Can anyone help?
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Wed Nov 20, 2013 10:01 am

@Dasat
The link is on this page
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Wed Nov 20, 2013 2:37 pm

@septeven, gotten. Thanks!!
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Mon Dec 09, 2013 9:38 pm

Evening!
Great plugin, just got it hooked up like a charm. Just wondering one thing though and this may be me being totally stupid, but I take it that we can't run this using preview mode?

I mean, the project has to be exported every time we update anything such as event sheets on the capx?

It got me wondering as I've been trying to get it working from the preview side, but wasn't sure if Construct has things in place that prevented one from doing so.

(hopefully it's not too late to post on this thread!) :P

Cheers!
B
5
Posts: 22
Reputation: 278

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: Aphrodite and 6 guests