;

PDA

Click to See Complete Forum and Search --> : send file to email


infinity4riflex
08-05-2008, 04:34 PM
Hi!

I checked the forum.. but nothing found..
If anyone can help, here is what I want to do..
in KoolMoves

Add a browse button that the user can click on it, then select a image, click ok.
When the user click on the send button (which send my other form variables to a php file and email me with those info) I want to receive that file as attachement to the mail that I receive (and contains the other info).
I think I need to add a browse button to my project (don't know how) and add some lines in that php file (don't know how)

I hope I am pretty clear..

Stoke Laurie
08-05-2008, 06:57 PM
Search here http://board.flashkit.com/board/forumdisplay.php?f=4
it's the php section of Flashkit

infinity4riflex
08-05-2008, 07:03 PM
already done that.. i found nothing to work for me :((

found a version of myuploader on koolexchange.. but if I copy/paste the symbols and the action frame from key frame 2.. does not work in other project :(
I thought maybe uploading somewhere then sending the link in mail is the same thing so.. this WAS another solution I thought.. not worked.. :(

infinity4riflex
08-05-2008, 07:08 PM
any help?

blanius
08-05-2008, 08:53 PM
Study the upload example and get that working first.

Then when you have that working including the PHP part of it (critical).

Now look in some PHP resources for how to send email with attachments, there are some ready to use classes you can use are out there I'm sure. incorporate this into the PHP that accepts the upload.

One thing at a time when approaching a complex task. Get the upload working first..

infinity4riflex
08-05-2008, 10:08 PM
what upload example?
the one that I took from koolexchange?

I have studied the browse thing.. don't know why it works only in that project..
I understood that I should create a normal button; that normal button becomes a browse button because of the actionscript. So, I've added the actionscript at the frame actionscript, as in that koolexchange example.. but nothing happenes.. I've tried a lot :( don't know what I am missing
I think this is the first thing to do.. make that browse button work in koolmoves..

then I have to make the adress file selected by the user to go into a variable
then, from that variable, i have to send it to the php file, from where I have to send it to my mail

this is what I understood..
without first thing working.. I can't do any of others..

does anyone have a browse button example?
or maybe a input file form in km?

infinity4riflex
08-06-2008, 10:25 AM
var allTypes = new Array();

var imageTypes = new Object();
imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";

allTypes.push(imageTypes);

var listener = new Object();

listener.onSelect = function(file) {
log.addItem("File selected for upload");
filename_txt.text = file.name;
size.text = file.size;
type.text = file.type;
name.text = file.name;
}

var fileRef = new flash.net.FileReference();
fileRef.addListener(listener);

// Browse the user's computer and set the window to show ONLY "Image Files" with these extentions.
browse.onClick = function(){
upload.enabled = true;
fileRef.browse([{description: "Image files", extension: "*.jpg;*.gif;*.png", macType: "JPEG;jp2_;GIFF"}]);
}


shouldn't the last function make my push button browse?

blanius
08-06-2008, 11:00 PM
It helps if you understand what the code does, just to copy and paste may not get it done. For one onClick is specific to KM components. Are you using the GUI buttons for your browse button? and is it named browse? Also make sure you are exporting as flash version 8

Here is a simpler version that doesn't fill in text fields using the listerner object


var allTypes = new Array();
var imageTypes = new Object();
imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";
allTypes.push(imageTypes);


myFile=new flash.net.FileReference();

btn1.onRelease=function(){
myFile.browse(allTypes);
}

in that example the button is GUI button named the default name btn1

thesween
08-07-2008, 06:02 PM
Also, when copying some examples from the exchange, make sure the Export Settings are the same.. sometimes makes the difference.

infinity4riflex
08-08-2008, 06:22 PM
lol :D it was because of the min version
i was exporting as flash 6(min req)
I think KM didn't understand that the actionscript requires 8.

THANKS A LOT !!!!!!!!!!!