[Solved]Custom code through Browser object?

Get help using Construct 2

Post » Mon Mar 03, 2014 7:10 pm

@QuincyDK
Hey, sorry I wasn't of more help either to your problem in the other post. What you just said made me ask myself : are those static data ? If so, the problem isn't the same. Executing code through execJS won't be a problem as it will only be for development. Once you've got the static data loaded in you array(s), you can use the "download" action to get there content as a C2 formated JSON file, that you will then be able to use in replacement of the execJS, for the real game.
B
17
S
8
G
4
Posts: 473
Reputation: 6,191

Post » Tue Mar 04, 2014 7:38 am

Guizmus wrote:@QuincyDK
Hey, sorry I wasn't of more help either to your problem in the other post. What you just said made me ask myself : are those static data ? If so, the problem isn't the same. Executing code through execJS won't be a problem as it will only be for development. Once you've got the static data loaded in you array(s), you can use the "download" action to get there content as a C2 formated JSON file, that you will then be able to use in replacement of the execJS, for the real game.


Hey there! It isn't static data, as we grab the data from one of our servers. This data differs per "file". Hence the function we've written to convert to a C2 JSON string.
B
7
S
2
G
2
Posts: 46
Reputation: 769

Post » Thu Mar 06, 2014 10:40 am

Rabenmutter wrote:I'm sorry I couldnt help you. Please inform me about your progress!

Here is the update: I came across callJS (plugin) and that has allowed me to use my own script file.
With CallJS.execute("function();") I can execute a function, and then by using the CallJS.ReadExecutionReturn I can retrieve the return value :)
B
7
S
2
G
2
Posts: 46
Reputation: 769

Previous

Return to How do I....?

Who is online

Users browsing this forum: adventurist, David181 and 24 guests