ClocksTNW's Recent Forum Activity

  • Link to .capx file (required!):

    speedy.sh/4ZSmf/sigh.capx

    Steps to reproduce:

    1. Create a textbox with whitespace at the end.

    e.g: "I dislike trying to fix this                               "

    2. Use trim to delete whitespace.. set width of the textbox to Text.TextWidth.

    3. Pin an image to the center of the textbox.

    Observed result:

    Using trim may delete the whitespace, but it will not resize the box. When setting the box to "Text.TextWidth," frequently latter parts of the string are deleted. For example, "I dislike trying to fix this" can become "I "

    Expected result:

    I expected the Textbox to resize to contain ALL of the text, not just the text before the first " "

    Browsers affected:

    Chrome: yes

    Firefox: iframe did not load correctly

    "[20:37:45.634] Error: WebGL: A texture is going to be rendered as if it were black, as per the OpenGL ES 2.0.24 spec section 3.8.2, because it is a 2D texture and its width or height is equal to zero. http://www.progressfestival.com/BandNameGame/c2runtime.js:38"

    Internet Explorer: yes

    Operating system & service pack:

    Windows 7

    Construct 2 version:

    r153

    I apologize in advanced if this has ever been addressed in the C2 forums or I am ignorantly posting something in the bugs section that does not belong here. If you would like to see an example in action, please visit progressfestival.com/test.php

    ^^you will see sections and portions of artist names, from an AJAX request to

    progressfestival.com/GameTest2.php

    which has all of the artist correctly listed, separated by commas.

    One final thing: The AJAX request works perfectly if "Textbox.setWidth=Text.Width" is disabled. Almost every artist name does not load correctly otherwise.

  • Thanks, that's a good idea. I'll change it in properties, but as I posted in the .capx example, 0.5*text.width does not work. If you could post an example with it working, I'd be very impressed.

    EDIT:

    Here's the problem though - if I want to dynamically change that text, and I set the object to pin to the center of the text, it will pin to the center of the text & the whitespace, regardless of whether I use the "trim" function.

    Example - the center of this string:

    "string1                                       "

                            is here

    Now, let's say I want to change the WIDTH of the text like this

    Set Width(Text.TextWidth) will delete entire strings. Sometimes, it will take a phrase like "I went shopping" and return "I   "

    As far as I can tell, the trim function does not do anything, and the set Width = Text.TextWidth deletes part of my string.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've used variables, trim, len(text.text) 0.5*(text.width), textbox.textwidth...

  • Seriously. I've tried everything. In my opinion, as an example, both of these methods should work.

    "TextWidth

    TextHeight

    Return the size of the actual text content within the text object's rectangle."

    returns something ludicrous

    "len(x) - return length of the string x"

    returns 0

    this guy

  • Thanks for your response!

    I've tried two separate 3rd generation iphones and my samsung Galaxy s3 - so I've used Safari, Chrome, and also tried Firefox. While loading - the page is fine - the data pops up if you select an artist and you can zoom in and out. Once its loaded, the page is usually frozen.

  • Hi all,

    I'm having some SERIOUS problems with my mobile site! Basically, my code works fine on my computer.

    Here's the issue on mobile devices:

    Within the first 2 seconds of the page loading, everything runs perfectly fine. After 2 seconds, nothing is clickable - the page is essentially frozen. My HTML links do not work, users are unable to scroll, zoom in or out, etc. The game is still running, but nothing is responding.

    Here's what I've tried:

    1. Searching Scirra forums/Google for over 24 hours.

    2. Re-exporting the file from Construct 2: This option works - but after adding any sort of HTML link to the page, same issue. In fact, one time I uploaded the project to my server, copy pasted the text into another file, and the second file did not work on mobile, with the EXACT SAME CODE (referencing the same files.)

    3. I felt like it had something to do with reloading the page. Many times, the first time my mobile browser loaded the game, it would work fine. I disabled all caching/web storage - this did not fix the issue.

    4. Using incognito modes, clearing site data.

    5. I used a javascript function to reload the page every 5 seconds. One out of 10 times, the site loaded fine, and I was able to click all of the links and buttons normally.

    Below, I've provided links to my website, ProgressFestival.com. The only piece of code I've added in Jquery is:

    $(document).click(function(){

    var windowname = window.name;

    window.alert(windowname);

    });

    As you can see, in the desktop version, the game returns the object ID of the object clicked.

    progressfestival.com/GameTest6.php

    In the mobile version, when the site is FIRST LOADED, the same thing will work.

    90% of the time, after 2 seconds, the site freezes. I'm stumped. Somebody please put me out of this misery. I feel like it has something to do with the canvas creation - when I disable that one line

    "//cr_createRuntime("c2canvas");"

    my code works. This is further evidence that the problem is most likely a Construct 2 problem. Below, I've attached a picture of the way I used to look before encountering this glitch

    <img src="http://i44.tinypic.com/2isfp20.jpg" border="0" />

    Now, I've become a shadow of my former self... I've lost all confidence in programming I once had. I tried to take a picture of my face but my camera lens broke due to the dreariness of the shot.

    Any help is seriously appreciated. In fact, maybe just a "hey man, you'll get this to work one day and feel much better" comment here or there.

  • Thanks, I'll try the Browser Object first, but will probably look around for plugins or make my own later

  • Hi all,

    I was wondering if it were possible to use JQuery on my website to respond to a click event going on inside my Construct 2 application. For example, I'm creating a website for a music festival - and I want all of the band names to fall out of the sky on the main page

    This Guy

    I was thinking about fooling around with .gifs, flash, etc, but for now I'm trying out Construct 2. My question is - is it possible to create an alert window with JQuery/JS if someone clicks on a Construct 2 object? I know I can hardcode all of the information into the application, and will eventually use AJAX to communicate with the database if I need to. lolz

  • Hi all,

    About 80% of the time I run my program, which worked fine in r139, I get a "Javascript error! Uncaught InvalidStateError:" 20% of the time, this error is not reproduced, and the app runs with full functionality.

    The error then states that I should submit a report in the "bugs" section, but I cannot submit my .capx, as it is not yet copyrighted and I do not have the authority to release it yet.

    The message also states that the error occurs on line 1262, but I have no idea how to determine which line of code is 1262, or why the error is popping up.

    Any help would be much appreciated! Below is the message:

    <img src="http://s12.postimg.org/t0clp9rod/Construct_2_error.png" border="0" />

    <img src="http://s18.postimg.org/9muxikpd1/debugger.png" border="0" />

    I apologize in advance if this has been reproduced in the forums already, I did a search and did not find anything.

    Thanks!

    -John

  • Wow... that's not at all what I mean. I just mean you put a number in the application and it dials it for someone when they click it... like every number on the internet

  • Auto-dial, or any auto-activate device actions can be very costly in some cases. so I hope C2 or html5 can keep the distance with those things.

    Buf if in the furture they have to implement those feature for some reason, they should warn the user with some full-screen modal dialog at least three times before the activation.

    What do you mean "costly in some cases?" We should be expanding our gaming vision!

    Anyway, even if it doesn't function well, would you know of a way of auto dialing a number? Would I need some mods?

    Thanks

  • It should work on CocoonJS if I'm doing it right, correct?

ClocksTNW's avatar

ClocksTNW

Member since 20 Jun, 2013

None one is following ClocksTNW yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies