farhanx's Recent Forum Activity

  • I need to referesh my construct2 canvas by a hyperlink on my html5 document ...i tried the following code

    var c=document.getElementById("c2canvas");
    var ctx=c.getContext("2d");
    ctx.clearRect(0,0,500,580);
    
    [/code:2dj2fo5h]
    
    I thought maybe clearing the rect may call OnlayourStart function but i am getting null object in my ctx...then somewhere on internet i found this code where it was written it can refresh the canvas from the start.
    [code:2dj2fo5h]
    var oldcanv = document.getElementById('c2canvas');
    document.removeChild(c2canvas)
    
    var canv = document.createElement('c2canvas');
    canv.id = 'canvas';
    document.body.appendChild(c2canvas);[/code:2dj2fo5h]
    
    but this also did not work , i just need simple way to re-load my whole construct2 canvas by hyperlink ..so the "On start Layout" would get call one time by its trigger whenever someone clicks the hyperlink.
  • i was wondering how can i replicate the mouseover event using touch object. Suppose if user come over on any sprite object then rather than detecting click i need to detect if that user finger is on that particular sprite ....

  • yes i have looked at this tutorial ..but the author has not target the cooconjs , my problem is I am using

    cocoonjs since i need to make my game for ios. So when i export my construct2 game using cocoonjs then the index file i see only with the following code.

    <html>

    <body>

    <script src="c2runtime.js">

    </script>

    </body>

    </html>

    Now i do not know how to go with this one...suppose if i need to create a div panel then shall i add this script js inside or it will load it by it self ??? I need to create a proper web form using div , i have used APP Framework of IntelXDK but when i test it with launcher in ios i see abnormal screen..

  • after i export my game in cocoonjs i get index file , that index file contain only following code

    <html>
    	<body>
    		<script src="c2runtime.js">
    		</script>
    	</body>
    </html>[/code:1j2b524d]
    
    I was wondering can i add html based forms and sub pages in this index file ?  I did the same thing using android with crosswalk but the cocoonjs exported code is totally un managed and unorganized without folders... If anyone has done this before if yes then kindly share your experiences and samples???? 
    
    Note: i tried to add few things but nothing works
  • suppose if i create a simple html5 page and put it inside the same directory of the exported construct2 files then how can i load that html5 page using browser object? The browser object only takes http web address but i want to target the static file beside the index file of the game? is it possible?

  • farhanx You should take a look at the new CJS plugin! It supports native textfields now! (It's included in the latest C2)

    Webfonts can appear differently on different devices, I suggest using Spritefonts for consistency-http://www.scirra.com/forum/sprite-font-generator_topic72160.html

    For lists, however, you'll have to create your own solution to that (unless someone already has one, might be one on the forums somewhere)

    I checked their demo it opens a popup alertbox to obtain the test ... its sad that there are no other way to display textfield and other stuff using cocoonjs?

  • how about ajax based communications

  • Form is the required thing for my game , but cocoonjs does not display textfield , webfonts and listboxes. What is the best solution to make forms that will run on all platforms without any issue???

  • hi,

    I am going to ask a very difficult question which has not been answer yet on "Construct2" forum. I believe no one has done this thing before or maybe i am unable to find the existing solution on any forum or tutorial yet...

    Here are my intention

    1) I need to make configuration and game option screens using XDK APP framework they will communicate through ajax etc so i am using app designer.

    2) I need to create a game in construct2 , which i have made it. Because canvas base game is only possible in C2 not in intelXDK app designer.

    3) I have exported my game in C2 using Crosswalk Android export , and then i have added that game code manually inside the index file of my intelXDK app designer project.

    4) Emulator display correct game and after building through crosswalk of intel XDK for android it even ran on android device without any problem.

    NOW the problem comes

    1) I want to build same game for window phone and for IOS iphone ipad.

    2) According to the construct2 i need to use export for each device , since for android they give us crosswalk export but for IOS / Windows8 they have different approach like ejecta/cocoonjs and visual studio etc..

    My question is how can i export my c2 game so i can merge this with my APP which is built using intelXDK app designer....

    Kindly help me i am very much confuse because i likes to use construct2 combined with intelXDK app framwork ...for all the platforms

    I have asked this question even on intel XDK App framework forum they also suggested the answers only C2 forum can give us for the merge of these two technologies ...

    https://forums.html5dev-software.intel. ... =31&t=6603

  • are you compiling with intel crosswalk ? Or with AGI exported code ??

  • Recently i have tested many thing i have tried CocoonJS , Intel XDK using cordova , crosswalk etc etc

    My game requirement were to make the game in html5 including the signup forms etc. To do that i have made my whole APP using APP Framework through intel XDK ...this works great on IOS IPAD , Android and window 8 phones... Now the critical part is came i need to merge my construct2 game canvas in my application which is build in intelXDK....

    At first i have exported my whole construct2 game in crosswalk and then i have merged the js and required html scripts in my intel APP which is made with XDK ... It works fine even on the real device of android ...

    But i am not sure how can i merge my c2 game exported for ios with intel app framework?? Because the exporter i have is cocoonjs which runs my game perfectly fine but exporting to the cocoonjs C2 gave me an index file with just js

    <html>
    	<body>
    		<script src="c2runtime.js">
    		</script>
    	</body>
    </html>
    [/code:3eo5qz5h]
    
    i feel like i am just lost ? Please help ...my simple requirement were to use HTML5 of XDK for all the APP screen and construct2 CANVAS for the game to run...
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i am trying to simulate if an object XYZ is touched and object B is visible then this object should become invisible otherwise if object XYZ is touched and object B is invisible then object B become visible.... But i am unable to simulate this condition and it handle only one condition ...for e.g. after the object become visible then i am unable to make it invisible using same touch technique....scripts are in my attached image

    [attachment=0:2hvan7rj][/attachment:2hvan7rj]

farhanx's avatar

farhanx

Member since 1 Oct, 2013

None one is following farhanx yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies