anthonyk's Recent Forum Activity

  • thank you for the advice ! This plugin sounds really great !

    I'll take a look ;)

  • I'm actually building a lottery like game with an opt-in form that tells if you can play or not. I'm using custom html/css/jquery to setup the form as I can't do this properly in C2. So when the form is submitted, I do some ajax to register the user before he can play. Then I need to call a game function to launch the right layout etc.

    I managed to trick this, changing a textbox value inside C2 from my custom JS, and on C2 listening for the textbox value to change :

    <img src="http://api.imajao.com/photo/EDJDI.png" border="0" />

    but this is not a proper way to do this simple thing^^

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • yes it helped to understand that textboxes can be accessed by id in the html. But you can't access global variables or functions like that.

  • thanks ! That will help a lot ! I'm wondering why those basic features are not implemented in C2.

    So this plugin can call js from c2.

    I will also need the inversed way, calling c2 functions from JS.

    If we can grab object with getElementById("myC2TextBox") there should be a way to call c2 functions as well !

    thank you for your help ;)z

  • Hi =)

    I'm looking for the proper way to communicate between c2 and my own JS functions in the html file.

    I can't find a good c2 JS reference, for instance the cr_setSuspended function is even not documented !

    So how do I :

    • modify c2 global variables from the html page ?
    • call a function defined in the c2 event sheet from the html ? Pass in variables ?
    • call a js function from c2 and handle the return value ? Calling Brownser Go to url "javascript:..." cannot get the value returned.

    Thank you so much for your help =)

anthonyk's avatar

anthonyk

Member since 11 Mar, 2013

None one is following anthonyk yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies