Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Flash Form Writes To Txt File Or Saves SO



I need to take the input of a user in several form fields, and write this to a text file locally. My goal is that the next time the user uses this program, I would use a load vars command and load the vars in that text file created upon the previous use.


I suppose if i could figure out how to do this using the sharedObject rather than text file, that would be ok also.
Any help would be appreciated.



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-08-2003, 12:46 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Send Form Data To A Php Script Which Writes The Data To A .txt File
Hi!

Ok, this might be very easy but I´m new to both AS and PHP so I´m struggling here and I havent found any useful tutorials to use only small bits here and there.

What I want to do: I have a form which send data to a php script which then writes the data to a .txt. This .txt file is then used by a .swf file to display certain values.
I also have 1 field that I want to use as a validation field as a simple(but yes, not very safe) way to make sure only the right persons submit information.

I have got the .swf file to read the .txt file so thats no problem.

Has anyone got any suggestions about how I do this?

I have an idea of letting the validation field be checked against a .txt file and if one of the lines in the .txt file matches the validation field the rest of the information is submitted and sent to the php script.
Difficult?

Many thx in advance!

A File That Writes Txt Doc
Here is a file that writes txt doc!!!
Here is an exe file that you can upload to a windows server that you
can pass variables to. The executable dumps the variables into a txt
doc.

The first variable in the list you send will be the name of the text
document outputted. The rest of the variables will be in the new doc.

The writetxt.exe file goes in the cgi-bin, but really doesn't matter
as long as you change the address below accordingly.

All the vars you want to pass should go in an empty movie on the
root timeline called VarBin, you can also change this or just pass
all the root vars by leaving VarBin out of the command below. If you
want to pass vars in the current timeline just use loadVariables()
without the stuff before it, or use this.loadVariables().

Pass vars like this:
code:
_root.VarBin.loadVariables("http://www.yourdomain.com/cgi-bin/writetxt.exe", "POST"); // Either "POST" or "GET" methods will work


Use "GET" for short lists of variables and "POST" for long lists of vars

Later,
vividclear

Saves PHP Instead Of JPG File?
I'm using the JPGEncoder and PHP to export a JPG of a movieclip instance out of my flash movie. Basically the end user hits a "save" button and they should get prompted to save to desktop.

Currently my code is prompting the end user to save my PHP file and not the JPG of the movieclip. Here's my AS3 code


ActionScript Code:
import com.adobe.images.JPGEncoder;
var serverPath:String = "";
function createJPG(m:MovieClip, q:Number, fileName:String)
{
    var jpgSource:BitmapData = new BitmapData (m.width, m.height);
    jpgSource.draw(m);
    var jpgEncoder:JPGEncoder = new JPGEncoder(q);
    var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
   
    var header:URLRequestHeader = new URLRequestHeader ("Content-type", "application/octet-stream");
               
    var jpgURLRequest:URLRequest = new URLRequest ( serverPath+"jpg_encoder_download.php?name=" + fileName + ".jpg");      
    jpgURLRequest.requestHeaders.push(header);       
    jpgURLRequest.method = URLRequestMethod.POST;            
    jpgURLRequest.data = jpgStream;
   
    var jpgURLLoader:URLLoader = new URLLoader();   
    //jpgURLLoader.load(jpgURLRequest);  
    navigateToURL(jpgURLRequest, "_blank");
}
save_btn.addEventListener(MouseEvent.CLICK, saveBtnPress);
function saveBtnPress(e:Event):void
{   
    createJPG(sketch_mc, 90, "sketch");
}

I'm thinking the problems may lay either in the line:

ActionScript Code:
var jpgURLRequest:URLRequest = new URLRequest ( serverPath+"jpg_encoder_download.php?name=" + fileName + ".jpg");
Or line:

ActionScript Code:
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);

Capturing Where A User Saves Their File To
I have written code to download a file. How can I get the location of the file that the user has just saved it to on their local machine? Do you grab it when using the select listener for the file ref. class? I am going to post it to a textfield like such:

ActionScript Code:
results.text = "You have saved the downloaded file to this location: " + localFileAddress;
// the result will have the path to the file on the users machine

How To Make Button That Saves File To Disk
Hi, everyone!
Does anyone know what code to use to make a button on your website that lets a viewer
save a file to his/her hard drive. It used to be as simple as getURL in actionscrip 2, but I have now idea how to do that in Actionscript 3.
Any help would be great.

How Do You Make A Button Thats Saves The Contents Of The Movie As A .jpeg File?
ive been checking out actionscript commands in the dictionary but i could not find any to use for a save button.

Does anyone know how to make a save button that when pressed saves the content of the movie window as a .jpeg image file?

It would be even better if when pressed the user gets a window were he can choose file name and location to save file to.

thanks vic

Flash Writes What User Entered Into A Text Box...
hi,
if i have for example "what is your name?", a text box underneath and and OK button, the user would enter there name and click ok, and then be taken to frame 2. how would i make it so that on frame 2 it says "hello (whatever user entered for there name on frame 1) ?

Thanks,
lee

Flash Game That Saves?
Just wondering, lets say that I make a really long flash game to play offline. Is it possible to make a flash game that saves?

Flash Webcam (clientside) Saves Images On Server
Hi,
Flash can connect to a local webcam and show the 'movie' in the flashplayer in the client browser.

Is it possible that the user on the clientside makes a snapshot of him/herself and send that snapshot to the serverside?

I'd like registrants to submit their photos with their profile. (it's for a college campus)

greetings
Patrick

Flash Webcam (clientside) Saves Images On Server
Hi,
Flash can connect to a local webcam and show the 'movie' in the flashplayer in the client browser.

Is it possible that the user on the clientside makes a snapshot of him/herself and send that snapshot to the serverside?

I'd like registrants to submit their photos with their profile. (it's for a college campus)

greetings
Patrick

Text That Types/writes On
Does anyone know where there's a tutorial that shows how to have text that instead of just appears is written across the screen, like in cursive? I know how to do the typewriter effect but if I'm using like, cursive script, I'd like to have it have the effect of actually being written. Does this make sense? Can anyone help?

Text That Types/writes On
Does anyone know where there's a tutorial that shows how to have text that instead of just appears is written across the screen, like in cursive? I know how to do the typewriter effect but if I'm using like, cursive script, I'd like to have it have the effect of actually being written. Does this make sense? Can anyone help?

How Do I Write In A Variable What A User Writes In An InputTextField?
I want what is written by a user in an inputTextField to be written down in a variable for further use. I want the action to be triggered when i press "Enter".

Can someone help me?

Thanks very much.

User Saves Something Done In Swf?
I'm working on a dynamic historical timeline that has tons and tons of data going into it that the user can filter down. The client wants the user to be able to save their timeline out once they are done and reopen it next time they log-in or even view other peoples saved timelines.

Is this possible? Can it be done? Does someone want to come and do it all for me whilst I go up the pub? There's a pork-pie and star wars comic in it for you...

Seriously, any help will be gratefully received.

Game Saves
need help making a savepoint. example...my game has a room were you can place objects anywhere you like, how can I make a game save to keep the user from losing all their hard work...??

SWF Decompiler That Saves As Is
I need a Flash SWF decompiler or reverse-engineer type program that will allow me to resize some object in the movie and then save out again and have it work correctly.

Any specific program out there to do this? Thanks.

Please HELP Fla Saves Differently Each Time
I would be extremely grateful if someone can help

I recovered an old project of mine, (whose fla I had accidentally deleted) using ******* SWF Decompiler...I start to continue work on that site like before and everything was going smoothly

But what started to happen is that everytime I saved the fla...certain symbols would get swapped...graphics would be moved left to right...and basically everytime i saved, the fla would changed internally in unexpected ways...I tried using both MX and MX Pro.. I tried copying all the frames and saving them to another timeline...nothing works...Each time I make any further changes to the FLA and Save it...IT opens up different...and just to let u know- just before I save it...I publish it to check if all is well...it is...then after the save...both the fla and further swfs i publish are completely different...graphics are interchanged and all over the place...masks are suddenly visibly and in the wrong place...responding to buttons that they had no link to!!!

Please help?? (((((((((

Text Input That Saves To Web So Others See It
Trying this question a little differently...

What I want to happen...

On my page I have a text input box and a submit button. Above these I have a display box where the typed text from the visitor will appear. When the visitor types in their text and hits submit, the text appears in the display box. When other users from the net visit the page, they see the new quote.

I am totally lost on where to even start on this one. Am I making sense?

Text Input Box That Saves To Web...
I am not sure if my title is adequately explaining what I want to be able to do. I want to have a text input box on my animation that when the site is visited, someone can type in a short quote, hit submit and have the quote appear in another textbox on the animation. The catch is that I want the new text to be displayed for any new visitors on the site. (basically want to have a visitor type in a favorite quote or whatever that will be displayed on the web for everyone until someone submits a new quote, then that one is displayed....etc.)

I am thinking that when I hit submit, the new quote will have to perhaps save to a txt file on the server that is accessed whenever the SWF is reloaded. Am I on the right track? If so, how do I accomplish this? I assume that I will need some sort of backend, but I am very lacking in that kind of programming.

Thanks for any and all help!

Anyone Knows A File Form In Flash ?
Hey Guys !!!
Anyone knows where i can get a tutorial or fla file of a file form in Flash 5 or MX ???
Thnaks in advance !!!!!!!!!!!

Flash Form Using XML File
Hi all!
I have Flash Movie that is a nice example of a simple flash form that can create, delete, edit data in an xml file. It is a todo list form. In my experimenting on how to learn how it was done I found that the data is not allowed to be changed or removed from the xml file when using the flash form to make the changes. The form itself was made to do so, but seems to be missing something. Is there a setting that I am missing to make the xml file changeable by the flash form? Or am I missing other files to allow the changes such as a *.php or *.asp? I am using Flash2004MXPRO. Since I am a noob to flash I figured I would rather ask then spend hours trying to figure it out.

Thanks
Sin

PHP Form In Flash File....
Hi all,
I downloaded from flashkit a PHP mail/contact form for flash 8. I tried to use it in a flash file.. but it just doesnt seem to work.

you can download the file here: http://www.allisonsbackstage.com/mis...henry-4983.zip

I assure you its safe.
Now when i tried to use it... I fill out the form and press 'send' and it just says "Please wait for confirmation..."
and it just stays there. nothing happens. Anyone good with PHP forms with flash???
Seems simple enough, i just cant figure out why its 'stuck'?!? Im sure php is enabled on the server too.

If anyone can help.. i would SOO appreciate it!!!! Geezer? anyone? lol
I realldy do appreciate all the help you had given me already.

Thanks!!!!
-Allison

Flash MX Form To PHP File
I have a page that uses a flash MX form, which allows the user to input the username and password. User clicks the submit button (still in flash), and the values that were entered into the u/p input fields is passed to a PHP script. I cant seem to get the code on flas right. When i hit the submit button, nothing happens. I have the username input field instance named 'usernm' and the password input field instance named 'passwd'. for tge submit button i have this code.

on (release) {
formdata= new loadVariables();
formdata.textfielddata1=usernm.text;
formdata.textfielddata=passwd.text;

formdata.send("cusLogin/cusLogin.php","_self","POST");

// submit the data to PHP script using POST
// _root.loadVariables("cusLogin/cusLogin.php", _level0, "POST");
}

Im kinda lost if someone can give me a hand.. thanks

Flash MX Form To PHP File
I have a page that uses a flash MX form, which allows the user to input the username and password. User clicks the submit button (still in flash), and the values that were entered into the u/p input fields is passed to a PHP script. I cant seem to get the code on flas right. When i hit the submit button, nothing happens. I have the username input field instance named 'usernm' and the password input field instance named 'passwd'. for tge submit button i have this code.

on (release) {
formdata= new loadVariables();
formdata.textfielddata1=usernm.text;
formdata.textfielddata=passwd.text;

formdata.send("cusLogin/cusLogin.php","_self","POST");

// submit the data to PHP script using POST
// _root.loadVariables("cusLogin/cusLogin.php", _level0, "POST");
}

Im kinda lost if someone can give me a hand.. thanks

Button That Saves Time Of Release In Asp
Any tutorials or basic help would be apreciated.

I got a button that when i release it i want it to store that time in an asp document i can do the asp but how would i do the AS in flash?

Any hints or tutorials about the subject would be greatly apreciated, im seriously starting to go insane and i dont know what to do im more than a newbie but i sure aint solving this one on my own. Im practicly finnished with my site but until i can get this to work i cant do squat, since moust of the variables on the page depend on the time the button is released.

How To Make A Search Form That Opens A .swf File Form A Text Input ?
I'm working on a CD catalog, that has hundreds of pictures, and i need to create a search form that would open a file by typing its name

please help

Flash Form - File Field
Does anyone know how to create a file field in flash (the the field that has a text box accompanied by a "Browse... " button next to it). I want the user to be able to locate a file and upload it via flash. Thanks!

How Do You Attach A File From A Flash Form?
Can anyone help with this? I have a form that works fine, but i want the users to be able to attach files to send to the specified email address as attachments. HOw to do it?
thanks.

Nate Ohayon
nate@webaxe.com
http://www.webaxe.com

Upload File Form + Flash
Is it possible?

Anyone done it?

please tell me!!!

I've done it with html/asp but this is the first time i've tried to do it with flash.

Cheers,
Ben

Can Flash Input Form Outside The .fla File?
If I open a web page with a flash MC, and I want it to link when clikced. How do I input the URL from the HTML source where I embed the the .swf. So if I wanted to change the URL later, I woudn't have to go back change the .fla file, just the URL in the HTML editor.

Flash Form Dump To Txt File
Is it possible to get a Flash form to write straight to a text file?

I need this for a none web server application, simply user feedback form running on a local laptop.

Not sure if you can do it with out the aid of php, cgi, etc.

Please let me know if anyone has seen something like this

Thanks!!

Flash Form And File Size
I notice that when i create i new Flash Form app in MX pro that the file size starts out quite big.

I create a new form app, and then publish the "empty" fla ... the resulting swf file is just under 50KB!! ... the size report shows that just about all of that is action script classes.

Is there anyway to reduce the file size, or is the only way to use the time timeline with key labels?

Thanks in advance for any comments

Flash Form Work With Php File
Hello,

i am trying to make a flash form working with a php file that sends the input data into my email.
the text boxes are working but i cant make the radio buttons and check boxes to work.
is there some one that can tell me what should i do.
i have attached the files so you understand better what im trying to do.

thanks once again!

Attach A File From Within A Flash Form?
i run a film production company and on my website have a form where talent can fill in info and send for us to database. what i want to provide is the option to attach a file from their hard drive, ie. a headshot. we've all seen this in standard html docs.
[like below in this very page!]
can this be done via a button within flash??

any advice or suggestions would be greatly appreciated.

thanks!
Stephen

File Browser Form In Flash
Hello Good people
Please who can help me to build local file browser form feature in flash MX or MX2004

<input type="file"> - in HTML

Thank you a lot
Levon Gavalian

Flash Form - File Upload
Hi.

Ok. I am building a from so that users can send contact info to our email in box. I am using a flash php combo to send the var's to our email in box using post..this I have working. What I need help with is UPLOADING FILES.

I would like to have the user click a button that opens a dialog box, where they can choose a file of any type and have it uploaded to our server. Then I would like to have a link in the email created by the php for us to download the file.

This email will contain all the contact info entered and other notes typed by user with links to all the files that they uploaded

Does anyone know how to go about this. I am still not sure if flash can do this feature. Any would be greatly appreciated as I must get this application working soon. If you know where I can see a working sample or online tutorial or something along those lines, Thanks Mike.

Is It Possible To Update An Xml File Via A Form In Flash?
If so, how? :p
I have been searching for a way for some time now, i have tried to learn how to do it myself, but all my attempt were almost completely useless instead of learning new things

Can anyone please help me?

Ruud

File Upload In Flash Form
Hi!!!

Im developing a flash form for a website, and i also need that after the viewers fill the form, they could also upload 2 photos. These 2 photos can't be bigger that 200k each... does anyone knows the AS to do this?? Can i do this in a flash form, or just in a html form?
I dont have any clue on this, so... any help would be great!!!!

thanks in advance!
cheers

Attach File In Form Flash
how can atach file in form flash -php
thanks

Is It Possible To Update An Xml File Via A Form In Flash?
If so, how? :p
I have been searching for a way for some time now, i have tried to learn how to do it myself, but all my attempt were almost completely useless instead of learning new things

Can anyone please help me?

Ruud

A File Upload Form In Flash
Hi
umm, well, I was just sitting & the idea struck.

Can a file upload form be made in Flash? Ok, simple forms have been made in Flash before but can the fuctionality of the <input type=file> be incorporated in a flash movie through some scripting or is there a component available?


Any ideas & comments are welcome(though there are restrictions on comments stating that I am selected for the Looney Tunes Show)

Solutions are more than welcome.

File Field For Flash Mx Form
yo people, is there anyway to do file fields (e.g. upload file) in flash MX forms?
im fully loving mx flash and coldfusion but this seems like a fairly major ommission...?

che
vin

Help With Making A Flash Form/Saving Text To File/and Displaying In Flash
I'm trying to make a flash movie that has a form (with a textbox, textarea, and a submit button) that would save to a file and display it in a textbox. This is going to be a small site so MySQL isn't required.

I'm trying to do this completely in flash, without any outisde html forms. I know you can use php in flash but I wasn't sure how (and i've searched). And I'm not sure how to go about with making forms in flash. Is this possible, and are there any similar tutorials you could point me to?

Regards

Input Type File In Flash Form
Hi you all,

i'm making an form in flash, now i want to put a button into it like "input type file" in html.......so i can send a file with this form...

Can Flash Receive Parameter Form A Jsp File?
Hi,

I am preparing a web site.I use flash somewhere in the page.In my jsp file i take user informations from the database and i use them along session.The question is: When i push flash button in the page, i want to post these informations to another jsp file . Can flash do this? Please help.Thanks...

Edit External Txt File W/ Flash Form Pls Help
I have a txt file with variables that are loaded into my movie. I need to be able to edit the txt variables from the flash movie with a form. Is this possible? How? I have to turn this in tomorrow at 7:30am PST.

All I need to know is the editing part, loading is no problem. Thanks.

[F8] How To Generate .vcf VCard File From Flash Form
Hi all

I was googling for some code to generate vCard files from flash but I could't find anything.

I currently use actionscript and php to send email with data collected from a flash form and I would like to generate a vcard file to add to the mail as attachments.

This could be very useful if you have a lot of personal data sent by email and need to import to any address book that support rhe .vcf format (like outlook or apple's address book).

Thank you
M

Flash Form Output To Text File
I have a form in a swf that is just a typical guestbook. I would like the data that is input from all the users to output to a single .txt file? Can anyone please tell me how to do this? Thanks.

How To Send Form Results To A Flash File
Anyone knows how can i send form results to a flash file?
Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved