arrall's Forum Posts

  • I am working on a wallpaper making app. It seems to crash when saving a snapshot with the art on the screen being very complex (big PNG.) At first I thought it was an issue with sprites bleeding off the edge of the layout, but it would crash before that occurred at times. For now, I have simply switched to saving the screen as a 90% jpg which always seems to work.

    I just published this temporary fix to the Chrome Web Store and ColorMorphing.com, but I would eventually like to save the image with a user chosen-background, including an option for transparent.

    Can anyone shed some light on how I could get around this issue with large PNGs? Is it a known issue? A limitation of C2? HTML5? Certain browsers?

    Or perhaps it is another issue entirely?

  • It seems to have been that the first time the mainLayout was loaded, the left/rightSprites used 1:1 size. There after, on any mainLayout load, they used the scaled down size I had unknowingly, randomly chosen when I attached them to the layout/layer.

  • Thanks to the helpful community I can now load my art projects properly, but only the first time the parts are referenced. The second time the same project is loaded, all the parts have been shrunk down. It looks like they load at their appropriate positions, and the per-part scaleX/Y variables are being passed and saved properly, but they do not seem to be applied properly.

    If this helps:

    arrall.com/beta shows the issue. test/test, then go to top projects to find one to look at, twice(?)

    I tried making 10000 sprite frames, and then setting the frame to some random, huge offset thinking it was a sprite frame issue. No change.

    The "left" and "right" sprites that get system->create object-ed are not global. The layout switches to the mainmenu and then back to mainlayout properly. I am assuming all the extra duplicated sprites are destroyed when the layouts change(?)

    I did try making them global. In this case, the big parts stayed on the screen after switching between layouts, but loading the project again created new, tiny versions of the parts on top of the original, large parts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you!

    Looks like the animation frame solution will work for me. It has the 'on image url loaded' event that I seem to need to use to adjust height/width.

    I tried paster, which looks incredibly useful for another aspect of what I want to make, but I could never get the size/height/width to update. Paster does not seem to have an 'on image url loaded,' so setting it's size right after the action to load image from url seems to operate on an empty Paster object. Or I'm just very tired.

    Thanks again!

  • I need to be able to load images from URLs. When a user loads one of their projects, I use AJAX and php to retrieve:

    # of parts|partid1|partURL1|partid2|parturl2| etc...

    Thanks to the chrome debugging tip, I learned how to avoid the cross-domain issue, temporarily.

    I'm not sure how to approach this next step:

    At first I tried attaching a single tempSprite to the layout and using System>Create Object, then calling Load image from URL on (what I think is) a new copy of the sprite? The result was all the sprites ended up changing image, not just the newly created one.

    Next, just to see if it would work, I created two separate tempsprite1 and tempsprite2 sprites and attached them to the layout/layer. This approach works (as far as each sprite loading a different image/url), but so far, all I can see to do is set values (positions, scaling, custom zindex, rotations, etc) through actions attached to each individual sprite. This route means I would have to pre-define a large number of sprites and value setting actions to each sprite. Should I expand on the app (say color offsets etc) I would have to go back and edit every tempspriteX's 'set' actions. I tried functions as well, but to no avail.

    I tried using Families. I tried creating a new Family "parts" where parts contained a tempSprite sprite, but this had the same problem as the first approach, everything was the same image.

    I'm coming/converting from pure actionscript3 where I just create a loop that defined a temporary sprite each iteration, set its image and attributes, then pushed it to an array of sprites and continued until there were no more images from the php/url request. I do not know if anything like this is possible in C2.

    I have searched the forums a few times with no success. C2 is great. I've learned a lot in the few days I have used it. I'm amazed by the # of sprites I can manipulate on a desktop/html5 app compared to Flash. Even if I cannot find a good solution to this particular problem, I'm already happy to have paid for it.

  • Thanks! That console will be very helpful. It is a cross domain policy between and just arrall.com. Not sure how to fix that, so for the time being, I just string replaced with "" when fetching urls from the database.

    Now the issue is all of the copies of the tempSprite seem to share the same image data but allow for different positional data. What should I use if I want to create sprites with their own image data programmatically while the app is running? (short of declaring a ton of tempSprite1, tempSprite2, tempSprite3... etc) Sorry I have not gone through all of the tutorials, I was hoping to just verify that a few techniques are possible in Construct 2 vs Flash, before purchasing it.

  • I have a tempSprite that I use the System to create a duplicate of (I think is how this works?) But when I tell the newly created tempSprite to "Load image from URL" it does not change the image of the sprite. This part of the code is activated, and the URL seems to pass from AJAX, but the sprite does not change and the "on Image URL loaded" never triggers. I am running a compiled HTML5 website version. The pictures are stored on the same domain, though not in the same directory. The images are .PNG if that matters and I am using the free version for now. I have tried hard coding a valid URL as well. No change. It just copies the same graphic as the original tempSprite.

    I searched the forums, tutorials, and Google with no success.

    Any ideas?