;

PDA

Click to See Complete Forum and Search --> : upload image by user and use it in swf file


tmoore935
01-16-2008, 08:08 PM
Hello,
I have been trying to get an image that could be uploaded by a user and then loaded into a swf file on a web site. I can use PHP. It would be like a users pic be incorporated into a swf file. Pehaps inserted into a movieClip onto the swf.:confused:

silentweed
01-17-2008, 04:55 AM
use the FileReference class for uploading images to the server. have a look at http://www.tink.ws/blog/filereference-example/ for an example.

Once the image is on the server you can download it using the MovieClipLoader class and show it to the user

tmoore935
01-17-2008, 12:39 PM
Hello,
Thank you. I will try this and let you know.

silentweed
01-19-2008, 04:43 PM
your welcome

tmoore935
01-19-2008, 06:02 PM
I have not started this yet but I was thinking of another problem, If I get the pic onto the server and it appears in the swift with maybey movieLoader, I need to erase it so oher users cannot use it. What I am doing is something like at Bennigans restuarant. But simpler.

http://www.innerleprechaun.com/lepregrams.html

There is no registration here so I cannot imagine how 12 people could use this site at a time.

silentweed
01-20-2008, 12:19 AM
sorry i dont really understand the question - what do you mean erase it so others cant use it and 12 people cant use it at the same time?

tmoore935
01-20-2008, 01:08 AM
sorry i dont really understand the question - what do you mean erase it so others cant use it and 12 people cant use it at the same time?
If a user uploads a picture and uses it in a picture and then leaves the site, what keeps the next user from loading the first users pic?

If you look at the Benniganns program were a user uploaded his picture and uses it while another user does the same thing, what makes the swf file keep from mixing up the pictures with each user?

silentweed
01-20-2008, 06:46 AM
if two different people are on two different computers, if an image has been downloaded and viewable in one swf it doesnt mean the other person will see the that image.

The only way one person can download another persons image is if he directly browses to their image name on the server e.g www.abc.com/someimage.jpg

When you upload a picture to the server, make sure you give it a unique name so it doesnt overwrite any existing images of other users on the server..

You can more or less guarantee a unique name by giving each image that is being uploaded the name new Date().getTime()

(the name will end up being a timestamp in milliseconds - number of milliseconds since midnight January 1, 1970)

tmoore935
01-20-2008, 06:51 PM
:) Thank you again. It begins to make sense to me.

http://www.frameafriend.co.uk/
is perfect.

tmoore935
01-30-2008, 04:19 PM
Hello,
This is how far I have gotten.
I can get a picture up to my server/URL from a users pc. I can see it in a folder that I made when I FTP to the site. Ok, easy enough. Even though its online now, I cannot see how to get the swf file to call it and use it since each picture has a different name.:confused:

Hope this makes sense.