How do I load an image from hard drive into sprite object at

Just started using Construct 2? Post your questions here

Post » Thu Jun 04, 2015 9:33 pm

I'm trying to load a .jpg image from my hard drive into an object image without any success. Heres what I have been trying ...

System: On start of layout
Add Action: sprClouds Load image from "C:/GameImages/cloudsLight.jpg" (Keep current size)

With this code the object image remains blank when the program is run. What am I doing wrong?
B
9
S
3
Posts: 31
Reputation: 708

Post » Fri Jun 05, 2015 9:58 am

Because Construct 2 is HTML5 based, it works similar to web pages (they tend to load content relatively rather than exactly).

Try exporting to HTML5 and in the same folder put your cloudsLight.jpg image. Then in your events you instead load from "cloudsLight.jpg" without any other path/folder info.

Hope that helps! :)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
119
S
41
G
17
Posts: 2,211
Reputation: 19,634

Post » Fri Jun 05, 2015 12:38 pm

Message: delusan is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
Thank you, Jayjay for your very helpful solution. Your reply also led me to this tutorial by Kyatric - . Thanks again for the great learning experience!
B
9
S
3
Posts: 31
Reputation: 708

Post » Fri Jun 05, 2015 2:41 pm

Any time! and I couldn't see the link (it will appear after you have posted a few more times here!), but if you want to share it for others to find then try replacing the .com with (dot)com :)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
119
S
41
G
17
Posts: 2,211
Reputation: 19,634


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 3 guests