Ciao a tutti,ho una chat con il fastidioso login e password,se vorrei eliminarlo come modifico il codice e dove? vi posto lo script in php
/**
* Copyright © 2002 Macromedia, Inc. All rights reserved.
*
* FCSimpleConnect
* Moving or modifying this file may affect the applications installed on this server.
*/
#initclip 1
//
function FCSimpleConnectClass() {
this.init();
}
//
FCSimpleConnectClass.prototype = new MovieClip();
//
Object.registerClass("FCSimpleConnectSymbol", FCSimpleConnectClass);
//
FCSimpleConnectClass.prototype.onUnload = function() {
this.close();
};
// Initializes this Component, hides the Change Name Pop-up dialog
// Creates a Key Listener for Keys pressed inside the User Name text box
FCSimpleConnectClass.prototype.init = function() {
//
this.name = (this._name == null ? "_DEFAULT_" : this._name);
this.prefix = "FCSimpleConnect." + this.name + ".";
this.enterListener = new Object();
this.enterListener.owner = this;
this.enterListener.enterPressed = false;
this.enterListener.onChanged = function () {
if (this.owner.username_txt.text.length == 0) {
this.owner.changeName_btn.setEnabled(false);
} else {
this.owner.changeName_btn.setEnabled(true);
enterChar = this.owner.username_txt.text.charAt(Selection.getE ndIndex()-1);
if (enterChar == String.fromCharCode(Key.ENTER) ) {
this.owner.username_txt.text = this.owner.username_txt.text.substring( 0 , this.owner.username_txt.text.length-1);
this.owner.loginChange();
}
}
};
this.username_txt.addListener(this.enterListener);
};
//
FCSimpleConnectClass.prototype.close = function() {
// Let our server side counterpart know that we are going away
this.nc.call(this.prefix + "close", null);
//
this.nc.FCSimpleConnect[this.name] = null;
this.nc = null;
};
//
// Establishes a NetConnection using the appDirectory parameter,
// User Name and appInstance if available
// Handles basic NetConnection onStatus events
// and Attaches other components specified in the FlashCom Components
// parameter to the new NetConnection
FCSimpleConnectClass.prototype.serverConnect = function(username, appInstance) {
// Cleanup components
this.close();
for (var i = 0; i < this.fcComponents.length; i++) {
this._parent[this.fcComponents[i]].close();
}
this.main_nc.close();
// Uses an app instance if it's passed as a parameter to the movie
if (appInstance != null) {
this.appDirectory += "/" + appInstance;
}
// Check for last User Name, use username passed if supplied
if (username != null) {
this.username = username;
this.changeName_btn._visible = false;
this.inputBg_mc._visible = false;
} else {
this.local_so = SharedObject.getLocal("FCUsername", "/");
if (this.local_so.data.username != null) {
this.username = this.local_so.data.username;
this.changeName_btn.setEnabled(true);
}
}
//
if (this.appDirectory.substring(0,8).toUpperCase() == "FROMXML/") {
//need to load the server name from settings.xml
this.attachMovie("SettingsXMLLoaderSymbol","appSet tings",0);
this.appSettings.load();
this.appSettings.owner = this;
this.appSettings.onLoadSettings = function() {
if (this.serverName != "null/")
this.owner.appDirectory = "rtmp://" + this.serverName + "" + this.owner.appDirectory.substring(8);
else
this.owner.appDirectory = "rtmp:/" + this.owner.appDirectory.substring(8);
this.owner.actualConnect();
}
} else
this.actualConnect();
};
//
FCSimpleConnectClass.prototype.actualConnect = function(newName) {
this.rtmp_nc = new NetConnection();
this.rtmp_nc.owner = this;
this.rtmp_nc.onStatus = function(info) {
this.pending = false;
if (info.code == "NetConnection.Connect.Success") {
if (this.owner.rtmpt_nc.pending) {
this.owner.rtmpt_nc.onStatus = null;
this.owner.rtmpt_nc.close();
this.owner.rtmpt_nc = null;
}
this.owner.main_nc = this;
this.owner.connect(this);
} else
if (!this.owner.rtmpt_nc.pending)
this.owner.raiseOnStatus(info);
}
this.rtmpt_nc = new NetConnection();
this.rtmpt_nc.owner = this;
this.rtmpt_nc.onStatus = function(info) {
this.pending = false;
if (info.code == "NetConnection.Connect.Success") {
if (this.owner.rtmp_nc.pending) {
this.owner.rtmp_nc.onStatus = null;
this.owner.rtmp_nc.close();
this.owner.rtmp_nc = null;
}
this.owner.main_nc = this;
this.owner.connect(this);
} else
if (!this.owner.rtmp_nc.pending)
this.owner.raiseOnStatus(info);
}
this.rtmp_nc.pending = true;
this.rtmpt_nc.pending = true;
//if rtmp is specified, try both rtmp and rtmpt
//one after the other, and take the one that succeeds first.
var i=this.appDirectory.indexOf(":");
if (this.appDirectory.substring(0,i) == "rtmp") {
this.appDirectoryNoProtocol = this.removeSpaces(this.appDirectory).substr(i);
this.rtmp_nc.connect("rtmp"+this.appDirectoryNoPro tocol, this.username);
this.conn_int = setInterval(this,"connectRtmpt",250);
} else {
this.rtmp_nc.connect(this.removeSpaces(this.appDir ectory), this.username);
}
}
FCSimpleConnectClass.prototype.connectRtmpt = function() {
clearInterval(this.conn_int);
this.rtmpt_nc.connect("rtmpt"+this.appDirectoryNoP rotocol, this.username);
}
//
FCSimpleConnectClass.prototype.connect = function(nc) {
//Connect
this.setUsername(this.username);
this.nc = nc;
if (this.nc.FCSimpleConnect == null) {
this.nc.FCSimpleConnect = {};
}
this.nc.FCSimpleConnect[this.name] = this;
//
// Need to call connect on our server side counterpart first
var res = new Object();
res.owner = this;
res.onResult = function(val) {
this.owner.attachComponents();
}
this.nc.call(this.prefix + "connect", res, this.username);
}
FCSimpleConnectClass.prototype.attachComponents = function() {
//Attach Components
for (var i = 0; i < this.fcComponents.length; i++) {
this._parent[this.fcComponents[i]].connect(this.main_nc);
this._parent[this.fcComponents[i]].setUsername(this.username);
}
this.onComponentsConnected();
}
// Update the username for this component
FCSimpleConnectClass.prototype.setUsername = function(newName) {
if (newName == null) {
this.username_txt.text = "Your Name";
} else {
this.username = newName;
this.username_txt.text = newName;
}
};
// Callback from server when name is changed
FCSimpleConnectClass.prototype.changedName = function(newName) {
for (var i = 0; i < this.fcComponents.length; i++) {
this._parent[this.fcComponents[i]].setUsername(newName);
}
};
// Sends a changeName call to the server to actually change this user's name
FCSimpleConnectClass.prototype.loginChange = function() {
// Only if the username has actually changed send it the server
if (this.username_txt.text.length == 0) {
this.changeName_btn.setEnabled(false);
} else if (this.username != this.username_txt.text) {
this.username = this.username_txt.text;
this.main_nc.call(this.prefix + "changeName", null, this.username);
this.local_so.data.username = this.username;
this.local_so.flush();
}
};
//
FCSimpleConnectClass.prototype.checkName = function() {
clearInterval(this.intervalID);
var newName = this.username_txt.text;
var btn = this.changeName_btn;
if (newName.length == 0) {
btn.setEnabled(false);
} else if (newName.charAt(0) == " ") {
btn.setEnabled(false);
} else if (btn.enabled == false) {
btn.setEnabled(true);
}
};
FCSimpleConnectClass.prototype.removeSpaces = function(str) {
//remove leading spaces
var i=0;
while (str.charAt(i) == " ") {
i++;
}
str = str.substr(i);
//remove trailing spaces
i = length(str)-1;
while (str.charAt(i) == " ") {
i--;
}
str = str.substr(0,i+1);
return str;
};
FCSimpleConnectClass.prototype.setSize = function(newWidth, newHeight) {
this._xscale = 100;
this._yscale = 100;
this.username_txt._width = newWidth - 73;
this.changeName_btn._x = newWidth - this.changeName_btn._width;
this.inputBg_mc._width = this.username_txt._width;
};
#endinitclip
//
// This is called from outside of initclip to make sure all
// the other components have been inited, this establishes
// a new NetConnection and connects any other FlashCom Components
this.setSize(this._width, this._height);
this.serverConnect(_parent.username, _parent.appInstance);