Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 11-10-2009, 07:47 PM
Junior Member
 
Join Date: Aug 2006
Location: Germany
Posts: 28
Send a message via MSN to snakemedia Send a message via Yahoo to snakemedia
Question

Problem with exists and creats folder???
Code:
// Exernaling from flash player:
var scf = FlashPlayer.getVariable("myXMLText");

// Instancing to all important events and functions:
var appdataDir = getAppDir("%appdata%"); 
var smfolder = new Folder("SnakeMedia");
var smCfgfolder = new Folder("Configures");
var file = new FileStream("config.scf", "w");

// If folder does not exist:
appDataDir.path;
if(smfolder == 0)
	Folder.exists(appdataDir.smfolder);
else if(smfolder = 1)
	appdataDir.d = new Date(smfolder.dateCreated);
....


file.writeLine('<?xml version="1.0" encoding="UTF-8"?>');
file.writeLine(scf);
file.close();
But me can not show a new folder from appdata directory.

Output:
C:\Documents & Settings\<Username>\Aplication Data\ SnakeMedia \Configures \config.scf
%appdata% = C:\Documents & Settings\<Username>\Aplication Data\

How do we fix problem?`Best regards, SnakeMedia
Reply With Quote
  #12 (permalink)  
Old 11-14-2009, 03:55 PM
Junior Member
 
Join Date: Nov 2009
Posts: 3
Talking got you mind```

cheap uggs ukcheapest ugg bootsok uggugg factoryugg boots bailey button
Reply With Quote
  #13 (permalink)  
Old 11-15-2009, 06:55 AM
Junior Member
 
Join Date: Aug 2006
Location: Germany
Posts: 28
Send a message via MSN to snakemedia Send a message via Yahoo to snakemedia
Exclamation

WTF?? What is that? No Only we are developerfor SwfKit Applications...

Do not fake us! I say admins..

BVest regards, SnakeMedia
Reply With Quote
  #14 (permalink)  
Old 11-15-2009, 08:54 AM
Junior Member
 
Join Date: Nov 2009
Posts: 1
Default

There is no property that can represent the string text of a XML object, so you have to save the string text of it in another variable in action script. And in your code, the variable or property "myXML.text1" doesn't exist at all, so it cannot work.
Reply With Quote
  #15 (permalink)  
Old 11-15-2009, 12:57 PM
Junior Member
 
Join Date: Aug 2006
Location: Germany
Posts: 28
Send a message via MSN to snakemedia Send a message via Yahoo to snakemedia
Default

Quote:
Originally Posted by jappi View Post
There is no property that can represent the string text of a XML object, so you have to save the string text of it in another variable in action script. And in your code, the variable or property "myXML.text1" doesn't exist at all, so it cannot work.
Are you sure? If you know about like Adobe Air - File and FileStram?

But i know about File and FIleStream by Adobe Air is very smiler than SWFKit?? I do no know - YOu want to make sure with
Code:
			private var configFile:File = new File();
			private var fStrm:FileStream = new FileStream();
			private var configData:XML = new XML();
// load configuration data from XML file
			private function loadConfig():void
			{
				// resolve the file path of config file
				configFile = File.applicationStorageDirectory.resolvePath("config.xml");
				// incase file doesn't exist copy to storage directory
				if(!configFile.exists)
				{
					configFile = File.applicationDirectory.resolvePath("config.xml");
					configFile.copyTo(File.applicationStorageDirectory.resolvePath("config.xml"));
				}
				// create a file stream object to read config file
				fStrm = new FileStream();
				// read config
				fStrm.open(configFile, FileMode.READ);
				// getting XML content
				configData = XML(fStrm.readUTFBytes(fStrm.bytesAvailable));
				// change skin
				changeSkin(configData.skin);
				// close file
				fStrm.close();
			}
Now we know about Adobe Air smiler ...

But we must to learn with SWFKit with 2 different ways like AS3 and Fishscript 3.x

AS3:
private function loadConfig():void
{
fscommand"fish_run", "loadcfg");
};

Fishscript:
var cfgFile = new File("%appData%\\SnakeMedia\\Configures\\config.xm l");
var cfgFileStream = new FileStream(cfgFile , "r");
var cfgDateXML = new XML();

// If folder does not exist:
cfgFile = File("%appData%\\SnakeMedia\\Configures\\config.xm l");
if(cfgFile.exists){
cfgFile = File("config.scf");
cfgFile.copy(File("%appData%\\SnakeMedia\\Configur es\\config.xml"));
}

And UpdateConfig will to write once config.xml. Than it will to work - if config.xml into C:\\Documents & Settings\\<Username>\\Application Date\\ SnakeMedia \\ Configures \\ config.xml
???

Can not work? Is it posible because File(Folder or Specialfolder) can not work...

Why does it not? We need to example for File and FileStream??

Best regards, SnakeMedia

Last edited by snakemedia; 11-15-2009 at 01:04 PM.
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 03:37 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.