#include "NetServices.as"
#include "NetDebug.as"
///////////////////////////////////////////
//Requests Handlers
///////////////////////////////////////////
getFile_Result = function(texto){
if(texto=="Error") {
status.text = "Error opening the file"
mainText.text = ""
} else {
status.text = "File loaded"
mainText.text = texto
}
}
saveFile_Result = function(message){
mainText.backgroundColor = 0xFFFFFF
status.text = message
}
//////////////////////////////////////////
// Connection to service
//////////////////////////////////////////
var conn = NetServices.createGatewayConnection("Path to your gateway.php");
// Specify the service you want to use. There has to be a file called 'formToText.php'
// in your services directory.
var myService = conn.getService("formToText", this);
//////////////////////////////////////
//Components handlers
///////////////////////////////////////
function loadFile(comp){
//loads selected file
var file = comp.getSelectedItem().data
myService.getFile(file, this)
}
function save(comp){
//saves text to selected file
var file = list.getSelectedItem().data
mainText.backgroundColor = 0xCCCCCC
myService.saveFile(file, mainText.text, this)
}
stop()
-----------------------------------------------------------------------------------------------------------------------
this is the editing system of text files....but i don't really understand several things:
1. #include "NetServices.as"
#include "NetDebug.as"
what are these things for?
2.var myService = conn.getService("formToText", this);
"formToText" here is the name of folder or what???
-----------------------------------------------------------------------------------------------------------------------
plus, i tried on my localhost, and it doesn't work... I don't know, nothing shows in status area...
can anyone tell me how to set it up? (cuz by the original steps, it doesn't work...)