Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-22-2005, 02:51 PM   #1
Dosty
Registered User
 
Join Date: Sep 2005
Location: Italy
Posts: 2
Default Create a xml file on the disk

Hi, I'm trying to allow to my flash application user's to create a xml file on their disk with the support of a simple script aspx. The script I'm sure it works because if I call it with the browser with the right parameters it creates the file, but if I call it from the movie it doesn't work. The code is
ActionScript Code:
fileExtension = ".xml"; fileFolder = "Files"; saveSeparator = "\\"; loadSeparator = "/"; var File = new XML(XML); File.xmlDecl = "<?xml version=\"1.0\" ?>"; var resultXML = new XML(); resultXML.ignoreWhite = true; resultXML.onLoad = verifySave; var URL = "http://localhost/"; URL +=  "saveFile.aspx?filename="; URL += escape(fileFolder + saveSeperator + filename + fileExtension); File.sendAndLoad(URL,resultXML); verifySave = function(save_success) {     if (save_success) {         var server_error = this.firstChild.firstChild.firstChild.nodeValue;         switch (server_error) {             case "none":                 canvas.openErrorPopUp("File saved successfully.");                 break;             case null:             case "":             case "error":             default:                 canvas.openErrorPopUp("Error saving file.\nFile not saved.");                 break;             case "exists":                 canvas.openErrorPopUp("File already exists\nwith that name.\nTry a different\nfile name.");                 break;         }     } else {         canvas.openErrorPopUp("Error saving file.\nFile not saved.");     } }
Any suggests? Thank u, bye!
Dosty is offline   Reply With Quote
Old 09-22-2005, 03:40 PM   #2
Morg
1st party software!
 
Morg's Avatar
 
Join Date: Nov 2003
Location: South Africa
Posts: 916
Default

You can only use URL += "saveFile.aspx?filename="; in the browser.

As soon as you start passing variables to a URL, it has to run in the browser... Maybe look into using a 3rd party tool.. like Flash Jester or something. It could solve your problem.
Morg is offline   Reply With Quote
Old 09-22-2005, 06:28 PM   #3
Dosty
Registered User
 
Join Date: Sep 2005
Location: Italy
Posts: 2
Default

So, you said that it's impossible pass variables to a URL that doesn't run in the browser, right? Sorry, but I don't know Flash Jester, where can I download it?Is it free? Does it work whith flash mx 2004?
Thanks for the help!
Dosty is offline   Reply With Quote
Old 09-23-2005, 07:07 AM   #4
Morg
1st party software!
 
Morg's Avatar
 
Join Date: Nov 2003
Location: South Africa
Posts: 916
Default

http://www.flashjester.com/

Dont think its free, but I dont think its expensive either... Theres a trial download, I think...
Morg is offline   Reply With Quote
Old 10-08-2005, 04:15 AM   #5
madgett
is my last name...
 
Join Date: May 2004
Posts: 1,051
Default

Another one is MDM Zinc: http://www.multidmedia.com. That one's more expensive but it's 100 times better for larger projects.
__________________
Anything is possible with Flash, it's just a matter of inventing the possibilities
Certified Swfwizard
madgett is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:20 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.