Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-31-2005, 01:31 PM
Junior Member
 
Join Date: May 2005
Posts: 6
Default Saving data in a file through Save as dialogue box

Hello,

I want to save an XML file through SWFKit. I have invoked the data in a variable from Flash file. Now, when user click on the submit button, I want to open a "Save As" dialogue box. User will select the desired path and then the file should save as(with only .xml extenstion) to the selected path with data.

Can anyone tell me how to achieve this?

Many Thanks,
Guy Logical
Reply With Quote
  #2 (permalink)  
Old 05-31-2005, 01:52 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Saving data in a file through Save as dialogue box

Code:
function saveScores()
{
var score = FlashPlayer.getVariable("_level0.gResultXml"); //gResultXml is global variable in flash which contains a huge XML type of string.
// remove the old file
var df = Dialogs.fileSave("XML Files(*.xml)|*.xml|All Files(*.*)|*.*|", "xml");
if (df)
{
var xmlFile = new FileStream(df, "w");
xmlFile.write(score);
}
}
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:56 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.