How do I call c2 function from JS

Get help using Construct 2

Post » Sun Sep 25, 2016 6:09 pm

Message: AlexSYS can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Sorry for stupid question, but I read all than i can found, but I cannot solve my problem, like this
viewtopic.php?f=147&t=115902&p=835490&hilit=c2_callFunction#p835490

In C2 i wrote:

Function "PlayFun" ---- Text.Append Function.Param(0);

in index.html I wrote:
jQuery(document).ready(function ()
{
// Create new runtime using the c2canvas
cr_createRuntime("c2canvas");
if (c2_callFunction) {c2_callFunction("PlayFun", ["param1"]);} else {alert ("Not found function");}

});

Finally, I recieve index.html:101 Uncaught ReferenceError: c2_callFunction is not defined

What I do wrong?
B
5
Posts: 3
Reputation: 233

Post » Mon Sep 26, 2016 1:27 am

I've export my project into HTML5 web page and publish it/
B
5
Posts: 3
Reputation: 233

Post » Wed Sep 28, 2016 3:48 pm

Most of us use C2 to avoid raw JS. :-p
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
23
S
6
G
1
Posts: 1,419
Reputation: 4,857


Return to How do I....?

Who is online

Users browsing this forum: max2612 and 28 guests