correncec's Forum Posts

  • 10 posts
  • Okay, I have found a solution...I'm not 100% guaranteeing it won't have negative effects, but this has so far worked for me.

    Note that I am exporting from C2 for Cordova and then using Intel XDK to package into an .ipa.

    Step 1

    You need to export for Cordova with your .js UNminified

    Step 2

    Within index.html, add the following within the <script> tag that begins on line 72.

    	jQuery(window).resize(function() {
    		cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());
    	});[/code:170zbw8a]
    
    [b]Step 3[/b]
    Next, we will be modifying 3 spots within c2runtime.js. First, head to line 3381. You should see a line like this:
    [code:170zbw8a]	var raf = window["requestAnimationFrame"] ||
    	  window["mozRequestAnimationFrame"]    ||
    	  window["webkitRequestAnimationFrame"] ||
    	  window["msRequestAnimationFrame"]     ||
    	  window["oRequestAnimationFrame"];[/code:170zbw8a]
    
    	Just above this line, add the following two functions:
    		[code:170zbw8a]function window_innerWidth()
    		{
    			if (typeof jQuery !== "undefined")
    				return jQuery(window).width();
    			else
    				return window.innerWidth;
    		};
    		function window_innerHeight()
    		{
    			if (typeof jQuery !== "undefined")
    				return jQuery(window).height();
    			else
    				return window.innerHeight;
    		};[/code:170zbw8a]
    
    [b]Step 4[/b]
    Next, head to around line 3731, where you'll find something like:
    [code:170zbw8a]		if (this.fullscreen_mode > 0)
    			this["setSize"](window.innerWidth, window.innerHeight, true);
    		try {...[/code:170zbw8a]
    
    	Replace window.innerWidth with window_innerWidth()
    	Replace window.innerHeight with window_innerHeight()
    
    [b]Step 5[/b]
    Similar to step 4, head to around line 4987 where you will find:
    [code:170zbw8a]			if (this.lastWindowWidth !== curwidth || this.lastWindowHeight !== curheight)
    			{
    				this["setSize"](curwidth, curheight);
    			}[/code:170zbw8a]
    
    	Replace curwidth with window_innerWidth()
    	Replace curheight with window_innerHeight()
    
    [b]Step 6[/b]
    That's it - now compile as you normally would within Intel XDK.
    
    Again, use with caution - since I'm not Ashley, I don't know the reasoning behind stopping the use of window_innerWidth() and window_innerHeight(). All I can say is that so far, the issue has been resolved and I've not noticed any ill effects. I hope this helps!
  • Same story here - I'm using Cordova/Intel XDK. I have an older version of my app built pre-227 and I am not seeing this resizing issue. It was only after updating to build 227 did I notice this happening.

  • This is fantastic! Thank you so much. This is especially helpful for some of our clients who have specific branding standards for displaying their product and company names.

  • I don't know if anybody's still needing help, but I managed to hide the bar by including the Status Bar plugin within Intel XDK and then from within my app, using the Browser's Execute Javascript action to call "StatusBar.hide();"

    Works like a charm!

  • Hi Arne (or anybody else that may be able to help!) - I've purchased the ParseFE plugin and have set the Application ID, Javascript Key, and Client Key within the project. I'm just using the HelloParse.capx that came with the plugin.

    I've exported the project as Cordova, and here is where I'm stuck. I've tried emulating in Intel XDK (I'm used to PhoneGap, but it seems I can't use it for the ParseFE plugin) and every time I try to subscribe to a channel, I end up with the message "Push plugin not ready".

    What am I missing? Am I required to go through the setup at https://www.parse.com/tutorials/ios-push-notifications even for emulating a test version of the app?

    Any help would be greatly appreciated.

    EDIT: The "ParseFE.PushInstallationId" Doesn't seem to be defined when I click "Push Subscribe"...I suppose that might be causing an issue?

  • Hi there,

    I have a game that can potentially be in multiple languages - we use the same .capx and have the text content provided via database.

    The problem I am running into is with Chinese - I need my Text objects to wrap based on CHARACTER rather than WORD...I can alter this in the editor of course, but that would then make English look funky.

    Is there any way to alter the Wrapping property of a Text via the Event Sheet?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh wow! Seems like the relative path is working. Thank you so much for your great suggestion.

  • Hi everybody,

    I have a game that uses AJAX requests to a ColdFusion server. Things run perfectly smoothly in all browsers other than IE9.

    Digging into the c2runtime.js, I've traced the point of error to the line that reads:

    request.open(method_, url_);

    Enclosing that in a try/catch, I wind up with an error message "Access is denied"...

    The game and the requested file are sitting on the same server, so I don't believe there's any cross-domain shenanigans at work here.

    Any suggestions or help are greatly appreciated!

  • Sorry, I'm late to the party...but I've run into the same issue. One (annoying) workaround I've found...within Windows 8 on Parallels, open up your Device Manager. Under Display Adapters, you should see something along the lines of "Parallels Display Adapter"...right click and disable it.

    Your window may go wonky, but you can open up your capx. Once the capx is opened, you can re-enable the display adapter. You'll need to disable the adapter every time you open or create a new capx.

  • Hi everybody. I'm pretty new to Construct 2, but even newer to JSON.

    I'm in them midst of building a quiz-type of game that needs to be fed content from an external .json file. I know how I would do this in xml, but I feel my solution for using json might be a bit clunky...so I was wondering if I could get some feedback.

    In XML, I could structure something like this:

    <questionBundle>

         <question>

              <questionPrompt>Question 1</questionPrompt>

              <answer>Choice A</answer>

              <answer>Choice B</answer>

         </question>

         <question>

              <questionPrompt>Question 2</questionPrompt>

              <answer>Choice A</answer>

              <answer>Choice B</answer>

              <answer>Choice C</answer>

         </question>

    </questionBundle>

    I would then iterate through it, and set up an array like: [[Question 1][Choice A, Choice B, Choice C]]

    But in json, I don't seem to have the ability to layer my arrays. So my feeble newbie attempt is something like this:

    {"c2array":true,

    "size":[2,2,1],

    "data":[[["Question 1"],["Choice A|Choice B"]],

    [

    ["Question 2"],["Choice A|Choice B|Choice C"]]]

    }

    Then I'd use tokenat to parse through the "Choice A|Choice B" strings...

    So...sorry about the length, but does this seem like a legitimate way to store layered data like this? Or am I going about it in a super clunky manner? Anyway, I appreciate feedback! Thanks.

  • 10 posts