How do I find my params for the runtime.js

For developers using the Construct 2 Javascript SDK

Post » Sat May 28, 2016 7:51 am

Hi,

Excuse my confusion, I have watched a couple of vids and tried reading the tutorials here but I am at a loss. I don't understand where the runtime.js is getting its param variables for functions. I can see the alert example but I can't find where it is getting the myParam var for the function from.

Is this coming from the name as in AddComboParamOption("student_id");
So am I to use the text in the braces as my variable name for the function or am I just lost.

Hope someone can help I have some great ideas for plugins.

Cheers
B
10
S
2
Posts: 50
Reputation: 1,100

Post » Sat May 28, 2016 7:54 am

* moved to a more appropriate section as those who can help usually frequent this section.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,374
Reputation: 58,430

Post » Sat May 28, 2016 8:03 am

Thanks zenox98.
B
10
S
2
Posts: 50
Reputation: 1,100

Post » Sat May 28, 2016 10:21 am

@lukeo25

Action with combo params example in edittime.js:
Image

Things inside the (" ") are the text which users see in the option

Action defined in runtime.js:
Image

The action receives the param with "pos", but not the text or any variable. The action receives an option index:
Image

Srry for my English :(
B
19
S
6
G
2
Posts: 256
Reputation: 2,640

Post » Sat May 28, 2016 10:54 pm

Josek5494

Thanks for this.. In the second part here the AdMob refers to your action is that right?
B
10
S
2
Posts: 50
Reputation: 1,100

Post » Mon May 30, 2016 3:09 pm

lukeo25 wrote:Josek5494

Thanks for this.. In the second part here the AdMob refers to your action is that right?


Yes, you can put your javascript code in there inside Acts.prototype."yourActionName" = function() {......}
B
19
S
6
G
2
Posts: 256
Reputation: 2,640


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest