External Image (Object) References

Discussion and feedback on Construct 2

Post » Tue Oct 04, 2011 10:59 pm

I would like to reference images (Objects) used in Construct2 via a CDN or a URL in general instead of assuming the objects will be stored local to the html page/javascripts. Is there a way to achieve this now or is this something that's in the pipeline? This would be a very powerful addition to Construct2 because we could externalize parts of our games.
ngreiner2011-10-04 22:59:57
B
8
S
3
G
4
Posts: 11
Reputation: 2,537

Post » Tue Oct 04, 2011 11:46 pm

You can add an absolute path to your images. When you compile your game it will generate a file called c2runtime.js. It's minified, but you can do a search for "images" and you'll see the relative path. Just add your cdn location before the /images/ and it will pull the images. I did this for a game I ported from the iPhone.
B
18
S
8
G
7
Posts: 120
Reputation: 5,630

Post » Wed Oct 05, 2011 3:13 am

Thanks for the suggestion Ghengis. I supposed I could build a tool (or write a script) to do the replacement automatically after the export.
B
8
S
3
G
4
Posts: 11
Reputation: 2,537


Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite, shinichild and 7 guests