I’m write python server for work with local file system.
It’s read file, change directory, write file with flash connection from python server.
If wanna use this, you need ran cmd line and put on file TCPServer01_02_2011.py, if python 2.6 installing on your PC.
How to use with flash
package
{
import lex.fileSis.*;
/**
* ...
* @author Alex Lexcuk
*/
public class Doc extends Sprite
{
private var fileSis:FileSis;
public function Doc() {
fileSis = new FileSis();
fileSis.doneCallBack = fileSisDoneCallBack;
fileSis.changeDirectory('');
//fileSis.readFile('my file.txt');
//fileSis.writeFile('my file.txt', bytearray);
}
private function fileSisDoneCallBack():void {
if (fileSis.operation == 'changeDirectory') {
//fileSis.curDir
//fileSis.fileArr
//fileSis.pathArr
}
if (fileSis.operation == 'readFile') {
//fileSis.readFileName
//fileSis.readFileByteArray
}
if (fileSis.operation == 'writeFile') {
}
}
}
}
In demo project graphics editor. Load files jpg,gif,png draw and save as png