load Image from url at runtime

0 favourites
  • 4 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • How can I load an image from an url and put it on a sprite at run time?

    For example, i want to allow the user to use a custom image from an url as the "head" of a person sprite. I would not know the url until runtime, so i can't just pre-load the images using the editor.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • MySQL? I'd like to know too

  • Well. You could add a textbox to the layout and, instead of putting down an URL, tell "Load Image from URL" to load the image from the URL entered by the user inside that textbox. In short: Instead of an URL, you would simply write down "Textbox.Text".

    However, a better way to load sprites may be the drag and drop behaviour introduced with this plugin:

    scirra.com/forum/plugin-dragndrop-zone_topic58578.html

    I was facing a similar problem (I needed this for several sprite based editors inside my point and click adventure engine) when lemo was kind enough to tell me about it.

    sogen

    MySQL is for databases. It wouldn't make sense to query a single image through a database (except if you wanted to make an MMORPG/graphical MUD and save several characters' outfits on a server). AJAX is what you're looking for, which essentially is what the Load Image from URL object is mimicing.

  • This thread was posted in October 2011, before the Sprite object had a "Load image from URL" action, which is the solution you are looking for.

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