Per il javascript ho trovato diversi link su internet cercando con chiave "no right click flash", ma sinceramente è una soluzione che non mi piace.
Per il focus, considera questo codice:
Codice PHP:
var s1:SimpleTextField = new SimpleTextField(this, Const.BASE_TEXT_FORMAT, {type:"input", x:10, y:numChildren*20+10, width:200, height:15, border:true, borderColor:0, background:true});
var s2:SimpleTextField = new SimpleTextField(this, Const.BASE_TEXT_FORMAT, {type:"input", x:10, y:numChildren*20+10, width:200, height:15, border:true, borderColor:0, background:true});
var s3:SimpleTextField = new SimpleTextField(this, Const.BASE_TEXT_FORMAT, {type:"input", x:10, y:numChildren*20+10, width:200, height:15, border:true, borderColor:0, background:true});
var s4:SimpleTextField = new SimpleTextField(this, Const.BASE_TEXT_FORMAT, {type:"input", x:10, y:numChildren*20+10, width:200, height:15, border:true, borderColor:0, background:true});
s2.addEventListener(FocusEvent.FOCUS_IN, deleteClipboard);
s2.addEventListener(FocusEvent.FOCUS_OUT, deleteClipboard);
s3.addEventListener(FocusEvent.FOCUS_IN, deleteClipboard);
s3.addEventListener(FocusEvent.FOCUS_OUT, deleteClipboard);
function deleteClipboard (evt:FocusEvent):void {
System.setClipboard(" ");
}
Ora, tralascia il fatto che uso quel "SimpleTextField" che è una mia classe che estende TextField e mi serve per gestire la creazione di un textfield in una riga, considera quei quattro TF come normali textfield e guarda il codice, praticamente sia quando entro in quei due clip che quando esco dai due, reimposto la clipboard svuotandola, con la conseguenza che anche se faccio il copia-e-incolla, non otterrò nulla da quei campi e non potrò copiare nulla in quei campi.
Unito al controllo sulla combinazione CTRL+C e/o CTRL+V avrai il tuo inibitore sui quei campi.