|
|
|
#1 |
|
Game Player - Developer
Join Date: Mar 2005
Location: México living in Barcelona
Posts: 1,074
|
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 |
|
|
|
|
|
#2 |
|
Student
Join Date: Apr 2001
Location: -
Posts: 4,756
|
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
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: May 2002
Location: Hell... with frequent access to heaven ;)
Posts: 409
|
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. |
|
|
|
|
|
#4 |
|
Who needs pants?
Join Date: Apr 2001
Location: Somewhere
Posts: 1,975
|
There is a few tutorials for it, heres just a couple.
http://www.kirupa.com/developer/flas...erence_pg1.htm http://www.flash-db.com/Tutorials/upload/
__________________
www.howtoit.com |
|
|
|
|
|
#5 | |
|
Senior Member
Join Date: Jun 2000
Posts: 1,187
|
Quote:
![]() I created that. |
|
|
|
|
|
|
#6 | |
|
Student
Join Date: Apr 2001
Location: -
Posts: 4,756
|
Quote:
__________________
my new home: polycount old: Curing C. tech | Curing C. designs | tank | ortho. | zelda LTTP | Tile Edit. | scrolling 3d: 3d engine kit | ASE format | 3d binary format |
|
|
|
|
|
|
#7 | |
|
Senior Member
Join Date: Jun 2000
Posts: 1,187
|
Quote:
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. |
|
|
|
|
|
|
#8 |
|
SaphuA
Join Date: Oct 2002
Location: The Netherlands
Posts: 2,182
|
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.
__________________
|
|
|
|
|
|
#9 | ||
|
Game Player - Developer
Join Date: Mar 2005
Location: México living in Barcelona
Posts: 1,074
|
Thanks for all your comments guys
Quote:
Quote:
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 |
||
|
|
|
|
|
#10 | |
|
Senior Member
Join Date: Jun 2000
Posts: 1,187
|
Quote:
__________________
FlashCulture.com - Taking a broad look at the world of Flash FlashGameMaker.com - er..where I say stuff. Last edited by Boombanguk; 07-26-2007 at 01:09 PM. |
|
|
|
|
|
|
#11 |
|
Game Player - Developer
Join Date: Mar 2005
Location: México living in Barcelona
Posts: 1,074
|
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 |
|
|
|
|
|
#12 |
|
Senior Member
Join Date: Jun 2000
Posts: 1,187
|
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?
__________________
FlashCulture.com - Taking a broad look at the world of Flash FlashGameMaker.com - er..where I say stuff. |
|
|
|
|
|
#13 |
|
Game Player - Developer
Join Date: Mar 2005
Location: México living in Barcelona
Posts: 1,074
|
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 |
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Jun 2000
Posts: 1,187
|
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.
__________________
FlashCulture.com - Taking a broad look at the world of Flash FlashGameMaker.com - er..where I say stuff. |
|
|
|
|
|
#15 | |
|
Student
Join Date: Apr 2001
Location: -
Posts: 4,756
|
Quote:
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.
__________________
my new home: polycount old: Curing C. tech | Curing C. designs | tank | ortho. | zelda LTTP | Tile Edit. | scrolling 3d: 3d engine kit | ASE format | 3d binary format |
|
|
|
|
|
|
#16 |
|
Game Player - Developer
Join Date: Mar 2005
Location: México living in Barcelona
Posts: 1,074
|
Ill do more tests boombanguk, thanks
Renderhjs, thanks for the efford but im using a MAC so I cant run .exe files
|
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|