Insert user image inside game

Get help using Construct 2

Post » Wed Nov 09, 2011 7:11 pm

Hi!


I'm new to Constructor 2 and I'm still learning all the stuff, but I find some things I find weird.

I'm doing a kind of puppet toy with Constructor. I want to allow user to upload a photo, cut it with a mask, and use it as puppet head.

Can I do that with facebook object?

If not, does someone known some safe but easy to install php code to allow users upload photos, resize them, rename them with random name (so I can store many photos at a time in the web), crop it with a mask, and return that filename so I can insert it in the html5 javascript code?
B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Wed Nov 09, 2011 8:45 pm

For the PHP part, your best bet is a nice search on google for specialized website about PHP.

For the "import" of the modified image, you should take a look into the c2 plugins section of this forum, to the "Load image at runtime" plugin, this might be what you are looking for.

At the moment, there is no "easy"/straightforward way of doing what you are trying to achieve. It's pretty tricky anyway.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Sun Nov 13, 2011 7:32 pm

I thought I would be simple just by inserting a [code]<PHP>echo $filename</PHP>[/code] into the generated js file. My main dread was about php security--- I know there exist many php bundles capable of image converting in the fly, but, as I don't have much php experience, I don't know how to deal with web security.
B
39
S
11
G
5
Posts: 132
Reputation: 8,228

Post » Sun Nov 13, 2011 8:56 pm

You should take a look at this thread.
PHP is a full language, you need to learn its basics.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791


Return to How do I....?

Who is online

Users browsing this forum: imnotspecial, tomi71, totoe, Yahoo [Bot] and 13 guests