?
Solved

Can you upload images through Flash MX? using PHP and MySql and Flash

Posted on 2003-03-14
19
Medium Priority
?
331 Views
Last Modified: 2012-06-27
I was woundering if at all possible. Can you upload images through Flash MX, With the help of PHP and MySql?

If so How!
0
Comment
Question by:Imageman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 5
  • +1
19 Comments
 
LVL 22

Expert Comment

by:rascalpants
ID: 8137194
if you mean how can you "import" images, then just use the loadMovieNum("imagename.jpg", 0";  or  use loadMovie("imagename.jpg", "_root.movieclip");


is that what you are talking about?


or do you mean, can you use Flash MX to perform a file upload like that of an html form?


if that is the case, then here is an example of such an application:

http://www.rascalpants.com/flash_fileupload.zip


let me know either way...

rp
0
 

Author Comment

by:Imageman
ID: 8137364
Flash MX to perform a file upload like that of an html form?
 But I need the upload script to be in php.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8137731
okay...

the basic file upload script is:


copy($_FILE["filename"]["tmp_name"], $path.$_FILE["filename"]);


where "filename" is the name value of the html input object, and $path is a variable you can set in your code or form...



need any more help?


rp
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:Imageman
ID: 8137814
Where do you add the copy($_FILE etc in Flash MX.

I tried the example and it does not work at all. Do you have a PHP version working?

0
 
LVL 6

Expert Comment

by:henryww
ID: 8138106
!!!! ....

HA HA HA ...

i love it Imageman ...
0
 
LVL 6

Expert Comment

by:henryww
ID: 8138155
hey Imageman,

I will give u 500pts if u can work it out urself.
how's that?

with the example rp give u ... u will only need to change the hidden frame's form (action) to submit to a php file and write the code in php ... u will have to know what kind of server u are dealing with, because IIS/PHP use absolute path, Apache/PHP use relative path ok ...

are u good at HTML? do u know how to view the source file?

u really have to do some readings ...
http://www.phpbuilder.com/manual/features.file-upload.php

it is not that hard ... just read & try
0
 
LVL 6

Expert Comment

by:henryww
ID: 8138185
sorry if i am being stupid ...
do u know what is php?
have u installed php on ur computer or server?

or u just using ur hosting server to test it ... ?

u may not know where the tmp path is for apache and sonme hosting company don't allow upload thru php...
0
 

Author Comment

by:Imageman
ID: 8138246
Okay, I tell you what. Forget the question. I will work it out my self.

I Have never heard of any one adding an upload in flash.

I am not that good with PHP, I am a somewhat newbie to PHP.


Thanks Any Way
Imageman
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8139155
I gave you an example of an upload in Flash...  it is quite simple to do, you just have to know the basics of the programs/languages you are working with...


I assume you have never worked with PHP at all if you didn't know that:

copy($_FILE["filename"]["tmp_name"], $path.$_FILE["filename"]);

was supposed to go in your PHP file, not in the SWF(Shockwave File)


all you will need to do in Flash is pass a call to a javascript function that uploads the file information...


I agree with Henry about this one.... I think this subject is a little too advanced for someone who has not used any of the programs/languages they are talking about...


I can help you, but you have to help me out a little bit...

rp
0
 
LVL 6

Accepted Solution

by:
henryww earned 150 total points
ID: 8140176
imageman,

rp and i have given u the link & code which is more that u need. i am not laughing at u for not knowing, if it sounded like ... i am sorry ...

it is just the way that... it is because of rp ... !! LOL ...

take it easy man ... i was only trying to make u read and learn more by urself.

u have never seen a flash site with upload file function? because flash can send multipart/form-data, the upload is done by the browser, php or asp or whatever cgi program than takes care of the binary data... and u have u know what the web server is as well, that why i said in ur previous question... one by one ...

it won't take me more than an hour to give u an example using exactly what rp & i have written in the comments.

let me get some sleep now and u will have the live link working. i use my code in ur previous question, how to load images one by one in the preloader and using the same sample from rp to do the upload.

u don't have to give me any pts and u can have the moderator remove this question whenever u want.
0
 
LVL 6

Expert Comment

by:henryww
ID: 8153019
hey ... i haven't done it yet ...

..... !!!
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8153626
I wouldn't bother...

rp
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8153629
Henry,

what does the "ww" stand for in your username?

rp
0
 

Author Comment

by:Imageman
ID: 8153645
Rascalpants,

Why would you not bother?
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 8153680
because you have awarded the points already, and obviously are not interested in the solution...

if that is not the case, then I appologize...


rp
0
 

Author Comment

by:Imageman
ID: 8153701
I am interested int the solution. I gave the points because Henry stated that he was going to help with the solution.

So I probely should have waited. OOPS
0
 
LVL 6

Expert Comment

by:henryww
ID: 8153833
huh? ...
oh ww ... yeah ... my surname is WONG ... not WRONG ...
and my middle name is W too ...
so ...

it won't take too long to do an upload but i can tell u it is not going to work on all server, it depends on what webserver u are putting it, i am just going to use the exactly interface from rp and add submit the upload to a php file ...

wait ... it will come.
0
 
LVL 5

Expert Comment

by:Gitcho
ID: 12148996
rascalpants, i'm interested in your solution, the link to your upload script is dead ... i will open another question re. file uploads worth 500 if you can show me how to duplicate the HTML upload form in flash mx pro.
0
 
LVL 22

Expert Comment

by:rascalpants
ID: 12159785
send me the link to that question...

info AT rascalpants.com
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question