How to load external images as sprites?

This forum is currently in read-only mode.
From the Asset Store
500 monsters and creatures images for card games - Set 1
  • I apoligise that this is probably a dumb question, but I'm having a hard time finding answers and using the search function very well :/

    ...BUT, yes, is there a way to load external images NOT INTO THE ACTUAL APPLICATION but externally from a folder at runtime? Would it be similar to a sprite, whereas I could position the hotspot and multiple action points?

    Thanks in advance, guys and gals ^.^

  • In the srpite object,there is a funticon 'load external images from file'.

  • Awesome, thanks! Now how would I go about making animations using this method? Hotspots? :)

  • Bump

    Hello I'll use your asking to include my concern too: To use a Sprite for animation, I have to have an Animation Set, and Animation Frames of course. I couldn't find a possibility to create the Animation Set as an Action, and to add some Animation Frames to it during the same Event (just before the next Action "Load Image from URL").

    Is it possible to make an animation by using Load Image from URL??

    What if a Sprite does not have any Animation Frames yet??

    Cheers

  • XManBG Are you using Construct 2? If so then you'll need to load your Sprite images from a web server, or look for a plugin to load files from the disk sadly <img src="smileys/smiley6.gif" border="0" align="middle" />

  • Yes, I'm using C2 and working on a server. My pictures are located relatively to the project folder. My point is about an option in C2 to Create new animation frames from the event sheet. Because for now, I have to pre-create the needed animation frames and then fill them with the "Load image from URL" event. This is of course possible for small projects with known and limited number of frames, but not for a bit bigger game project, where I still have to manually change and reload all the Sprites.

    EDIT: <img src="smileys/smiley36.gif" border="0" align="middle" /> I see now, that I've landed in the Construct Classic part of the forum... it's a bit confusing with the search option of the forum, which delivers both, mixed results for C2 and Construct Classic.

  • XManBG Ah yeah, I see what you mean. In CC it was also a problem of needing to pre-create the frames sadly.

    However, I think I remember reading that in C2 the program recognizes duplicate frames and stores only one, so you might be able to use less VRAM by storing blank frames of 2^ textures( eg: 256x256, maybe 512x512's won't hurt performance too bad), and then it loads that frame once to fill all the animation.

    I'm not entirely sure that will benefit you as I've never tried it, but hopefully it does <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Yes ,there is a way to load external images NOT INTO THE ACTUAL APPLICATION but externally from a folder at runtime.you can refer to follow method:

    public static REDocument OpenDocumentFile(string filePath);

    public static REDocument OpenDocumentFile(string filePath, BaseDecoder dec);

    public static REImage OpenImageFile(string filePath);

    public static REImage OpenImageFile(string filePath, BaseDecoder dec);http://www.rasteredge.com/how-to/csharp-imaging/load-from-file/

  • Abigail, sorry but Construct 2 and Construct Classic do not work with C# so neither would support that, thanks for sharing the C# method anyway though <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Sample (.capx):

    http://arpa7com.com/56bFdVX

  • Meqara

    Thank a lot for this capx it works!

    But i was wondering , will it work with mobile???

  • It works for me on android, but I didn't try it on IOS.

    APK file: http://arpa7com.com/Rne1nqi

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But you should know that it doesn't work if you select the "Canvas+" Webview engine in Cocoon, so select instead of it "Webview+" or "Webview"

    *Edit: If it not work try to add cordova-plugin-file in your Cocoon project.

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