-
Game Player - Developer
upload a picture of your face question
Somebody ask me for a game where you can upload your face in order to play
I know this kind of thread is been discussed in the past but I cant find any
How can I do do that?
How to upload a picture of a player to add to a game?
Can somebody give me some ideas or help on this
"I love to make them as I love to play them"
-
using php? - I guess that would answer most questions. There is a way init the OS "dialogue to select a file " from within flash (starting flash player 7+) though I never played with it- variables then from the file location (or something like that) then can be passed to php in order to opload that data
-
Senior Member
Hmmm.. Im not sure, but I think you could use AS 3.0 camera and the Bytes object (im not sure of the name) to actually store the picture in a temp file.
Anyway is not needed, in regular As2.0 create a camera object, copy that surface and then use copypixels (or a draw) to use it as an sprite. I think I have some code here on how to store your camera image (for "motion sensing" purposes)
edit: OOps! you meant without a camera. Is simple just use a web form to upload a file, there are more complicated methods but you dont need anything else.
-
Who needs pants?
-
Senior Member
Originally Posted by scheletro
Somebody ask me for a game where you can upload your face in order to play
I know this kind of thread is been discussed in the past but I cant find any
How can I do do that?
How to upload a picture of a player to add to a game?
Can somebody give me some ideas or help on this
www.racemyface.com
I created that.
-
Originally Posted by Boombanguk
I created that.
it still doesn´t help with the initial question
-
Senior Member
Originally Posted by renderhjs
it still doesn´t help with the initial question
I wanted to show him that its something I've done, i.e he can ask me what he wants, and I'll try to help him out. Btw..
Basically you need a php script to take the image from Flash,and upload it to a directory on your server. Once its there you can download it again into flash for display.
thats all pretty straightforward stuff. The real tricky bit is how you will incorporate your image into whatever it is you want. For Racemyface ppl can actually choose what part of the downloaded image they want to place into the game. It uses dynamic masking, and getting it all lined up was a pain in the butt.
-
SaphuA
Yeah upload a picture using php. Then load the picture in Flash and allow the user to draw an canvas around it, to use as a mask. So you get decent shapes.
-
Game Player - Developer
Thanks for all your comments guys
There is a few tutorials for it, heres just a couple.
Thanks hooligan2001 for those, ill check them out
I knew about your game Boombanguk, found a couple of threads about a little problem you had in the game, I was about to contact you, but i wanted to see if there where some tutorials
Ill check the tutorials hooligan2001 put here and if I have any problem ill contact you because you are right, i need a dinamic masking and some more issues
"I love to make them as I love to play them"
-
Senior Member
Originally Posted by scheletro
Thanks for all your comments guys
Thanks hooligan2001 for those, ill check them out
I knew about your game Boombanguk, found a couple of threads about a little problem you had in the game, I was about to contact you, but i wanted to see if there where some tutorials
Ill check the tutorials hooligan2001 put here and if I have any problem ill contact you because you are right, i need a dinamic masking and some more issues
cool, just post your question here, and I'll reply. (thats if I dont get banned from this place first)
Last edited by Boombanguk; 07-26-2007 at 12:09 PM.
-
Game Player - Developer
Questions all
Because I dont have a clue, I saw those tutoriasl and I think my problem is PHP, the dont seem to work for me and I dont know where the problem is
I can figure out how to make the masking once you have the picture display in your flash, but first i need that first step
"I love to make them as I love to play them"
-
Senior Member
whats not working? you know you have to have the flash file online for it to work? if you are already doing that, whats not working?
-
Game Player - Developer
yeap, upload everything, I know PHP doesnt work locally unless I have running a special program
Maybe I need to change something in the script, I also give all the permises in my server
Strange
Ill keep looking
"I love to make them as I love to play them"
-
Senior Member
The Flash-db is what I based what I did on.
ok so you upload those files (the .swf, html and the php) to your server and it doesn't work? The important line in the php is this
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./images/".$_FILES['Filedata']['name']);
where "images" is a folder I created to keep all my images.
If it doesnt work on one server, and you have access to another try another server, because sometimes servers don't allow you to use that php function.
-
Originally Posted by scheletro
yeap, upload everything, I know PHP doesnt work locally unless I have running a special program
you might take a look @
http://portablewebap.com/
its a downloadable smal folder (zip file) where you only need to run a exe file and a whole php system with mysql databse is ready to go and opens the localhost in your default browser. No need to install,- if you want to exit it just click exit on the system tray icon.
-
Game Player - Developer
Ill do more tests boombanguk, thanks
Renderhjs, thanks for the efford but im using a MAC so I cant run .exe files
"I love to make them as I love to play them"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|