To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > General Help > Games

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-25-2007, 12:30 PM   #1
scheletro
Game Player - Developer
 
scheletro's Avatar
 
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
__________________


"I love to make them as I love to play them"
scheletro is offline   Reply With Quote
Old 07-25-2007, 12:46 PM   #2
renderhjs
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
renderhjs is offline   Reply With Quote
Old 07-25-2007, 01:45 PM   #3
AzraelKans
Senior Member
 
AzraelKans's Avatar
 
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.
AzraelKans is offline   Reply With Quote
Old 07-26-2007, 02:02 AM   #4
hooligan2001
Who needs pants?
 
hooligan2001's Avatar
 
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
hooligan2001 is offline   Reply With Quote
Old 07-26-2007, 05:44 AM   #5
Boombanguk
Senior Member
 
Boombanguk's Avatar
 
Join Date: Jun 2000
Posts: 1,187
Quote:
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.
Boombanguk is offline   Reply With Quote
Old 07-26-2007, 08:33 AM   #6
renderhjs
Student
 
Join Date: Apr 2001
Location: -
Posts: 4,756
Quote:
Originally Posted by Boombanguk
I created that.
it still doesn´t help with the initial question
renderhjs is offline   Reply With Quote
Old 07-26-2007, 08:45 AM   #7
Boombanguk
Senior Member
 
Boombanguk's Avatar
 
Join Date: Jun 2000
Posts: 1,187
Quote:
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.
Boombanguk is offline   Reply With Quote
Old 07-26-2007, 11:04 AM   #8
SaphuA
SaphuA
 
SaphuA's Avatar
 
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.
__________________
SaphuA is offline   Reply With Quote
Old 07-26-2007, 12:56 PM   #9
scheletro
Game Player - Developer
 
scheletro's Avatar
 
Join Date: Mar 2005
Location: México living in Barcelona
Posts: 1,074
Thanks for all your comments guys

Quote:
There is a few tutorials for it, heres just a couple.
Thanks hooligan2001 for those, ill check them out

Quote:
www.racemyface.com

I created that.
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"
scheletro is offline   Reply With Quote
Old 07-26-2007, 01:01 PM   #10
Boombanguk
Senior Member
 
Boombanguk's Avatar
 
Join Date: Jun 2000
Posts: 1,187
Quote:
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)
__________________
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.
Boombanguk is offline   Reply With Quote
Old 07-26-2007, 02:17 PM   #11
scheletro
Game Player - Developer
 
scheletro's Avatar
 
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
__________________


"I love to make them as I love to play them"
scheletro is offline   Reply With Quote
Old 07-26-2007, 02:52 PM   #12
Boombanguk
Senior Member
 
Boombanguk's Avatar
 
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.
Boombanguk is offline   Reply With Quote
Old 07-26-2007, 05:16 PM   #13
scheletro
Game Player - Developer
 
scheletro's Avatar
 
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
__________________


"I love to make them as I love to play them"
scheletro is offline   Reply With Quote
Old 07-26-2007, 05:27 PM   #14
Boombanguk
Senior Member
 
Boombanguk's Avatar
 
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.
Boombanguk is offline   Reply With Quote
Old 07-26-2007, 05:37 PM   #15
renderhjs
Student
 
Join Date: Apr 2001
Location: -
Posts: 4,756
Quote:
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.
renderhjs is offline   Reply With Quote
Old 07-27-2007, 12:59 PM   #16
scheletro
Game Player - Developer
 
scheletro's Avatar
 
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
__________________


"I love to make them as I love to play them"
scheletro is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > General Help > Games

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:32 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.