R143 Image Data URI causes "Dialog Screen" Bug

0 favourites
  • 8 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Link to .capx file (required!):

    https://dl.dropboxusercontent.com/u/65841566/R143DialogBoxLoadDataURIBug.capx

    Steps to reproduce:

    1. Use some png example https://dl.dropboxusercontent.com/u/65841566/SpriteFont_Andy_Bold_%2824%29_%5BLeft%2C0%2C0%2C0%5D_35x35.png

    2. Go to http://websemantics.co.uk/online_tools/image_to_data_uri_convertor/   and convert to data uri

    3. Create new project

    4. Add 1 Sprite Object

    5. In event add System->"On Start Of Layout"

    6. add action "Sprite"->"Load Image from URL"

    7. Paste the data URI in dialog box.

    Observed result:

    The dialog box become too big until the "OK" "Cancel" "Back" button is missing. Even if I press enter after that, all dialog box will be broken and I have to end construct 2 in task manager. I have to open construct 2 preferences and click reset dialog.

    If you open my capx file, just open it in construct and click on the event of "load image from url" to open the dialog screen. After that my construct is unstable.

    Expected result:

    Everything should be fine. Maybe add vertical scroll and horizontal scroll into the textbox in dialog screen ?

    Browsers affected:

    Chrome: no

    Firefox: no

    Internet Explorer: no

    Operating system & service pack:

    Windows 8

    Construct 2 version:

       R143

  • I sort of had the same thing but instead i was pasting like 40 lines of JSON code into the input box after which it looks like this:

    <img src="http://i.imgur.com/XZfyB08.png" border="0" />

    There doesn't seem to be any way to reverse since from now on all my input boxes look like this. :/

  • hdnine only way to fix it for now is to reset dialog screen in preferences

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is a ridiculous thing to do in the first place, since it would be much better to import the PNG as a project file and load it from an actual URL rather than a data URI. Even if for non-image content you have large amounts of data, it makes far more sense to paste them in to a text file, import them as a project file, and AJAX request them. You should never be pasting large amounts of data in to events.

    However to prevent the dialogs disappearing/corrupting, I've implemented a maximum height for the next build. The dialog still won't display correctly, but you shouldn't be doing this in the first place.

  • Ashley

    Thanks for implementing the fix. I have my own reasons why I`m doing stuff like this in the first place.

  • If you must have a string I'd suggest saving it as a text file, and adding it to the projects resources like Ashley suggested.

    The Ajax plug will then have access to it, and you can use it in several ways.

    Also sometimes its easier to paste a string into a variable. It seems to handle things like that better, however it does seem to have a lower limit for the length of the string.

  • newt ,thanks for the suggestion. Again, I have my reasons to try and do this. It is a bit bizarre. But it meets my requirement. The capx is just an example, I wont be doing stuff exactly like that in the projects.

  • tumira Thanks for the tip... worked perfectly. Didn't know about that feature. ^^

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)