A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [HELP] Upload custom face graphic into game?

  1. #1
    Junior Member
    Join Date
    Jul 2001
    Posts
    3

    Question [HELP] Upload custom face graphic into game?

    I am trying to make a game that allows the user to upload a jpg of a face that would replace a default face graphic in my mc, so their face would be on the character. I have no idea how to set up a Flash file to upload an image and keep the image during a series of animations, and am looking for assistance. This would work similar to some of the Flash greeting cards or the Elf Yourself site.

    My character will only face forward and have limited animation after the face is uploaded. I just need help figuring out how to make it so someone can upload their own image for the face when the game is posted online. The face does not need to be saved for later use, just while the user is on that page of my site.

    I have limited action scripting knowledge, so any steps you can explain would be very helpful! Thanks!

  2. #2
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    sigh, [as2] or [as3] would be much better tags than [help].... anyway read this:-
    http://markshu.ca/imm/flash/tutorial/fileReference.html

    after you have the image on your server, you just need to load it inside your face mc
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  3. #3
    Junior Member
    Join Date
    Jul 2001
    Posts
    3

    Unhappy

    Sorry! I don't know how to do it or even what it is called. I just need help making a .swf that would have an element that changes when a different one is uploaded temporarily.

    This tutorial looks like it only uploads an image to a server, but that's not what I am trying to do. How do I set up the .fla file to replace my default placeholder image that's in the file when someone on the internet uploads a new picture in the same dimensions? I would think Flash would have to replace the placeholder in the library, but I don't know how to automate that and set up an upload option. Help!

    I can use as2 or as3, whatever makes it work.

  4. #4
    When you know are. Son of Bryce's Avatar
    Join Date
    Aug 2002
    Location
    Los Angeles
    Posts
    838
    If your Actionscript knowledge is limited, this might be tricky.

    The easiest way to do this is using CS4 and exporting as Flash Player 10. The CS4 version of File Reference allows you to load an image from the user's computer directly and access its bitmapData. If you're not using CS4, you have to do it like Bluemagica's link, where you have to select an image, upload to a server, and then load the image from the server to turn it to bitmapData. You use this bitmapData to apply to a MovieClip and then you can use it in your game.

    It's also very straightforward to get an image from a webcam, with any version of Flash. Just activate the camera and capture an image to bitmapData. You can find tutorials for this on Google.
    Last edited by Son of Bryce; 09-10-2009 at 09:55 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center