TS91 Posted March 9, 2009 at 11:44 AM Report Share #249347 Posted March 9, 2009 at 11:44 AM Boas, em AS 2.0como é que faço para a textarea ficar lock, para não poderem alterar? Link to comment Share on other sites More sharing options...
pouic Posted March 9, 2009 at 02:40 PM Report Share #249392 Posted March 9, 2009 at 02:40 PM editableTF=new TextFormat(); unEditableTF=new TextFormat(); editableTF.color=0x000000; unEditableTF.color=0x666666; TextField.prototype.makeEditable=function(){ this.type="input"; this.background=false; this.border=true; this.selectable=true; this.setTextFormat(editableTF); }; TextField.prototype.removeEditable=function(){ this.type="dynamic"; this.background=true; this.backgroundColor=0xeeeeee; this.border=false; this.selectable=false; this.setTextFormat(unEditableTF); }; Utilizar: nome_do_input.makeEditable(); nome_do_input.removeEditable(); O que realmente é feito aqui é alterar o type da caixa de texto entre dynamic (não editável) para input (editável) Link to comment Share on other sites More sharing options...
TS91 Posted March 9, 2009 at 03:07 PM Author Report Share #249399 Posted March 9, 2009 at 03:07 PM Olha descobri com fazer sem ser preciso esse codigo todo. Vais aos componentes, metes a TextArea onde queres, metes o Instance Name, não alteras mais nada; vais as action no 1º frame onde tens a TextArea e escrever: InstanceName.editable = false; mas obrigado pela ajuda a mesma 😛 Link to comment Share on other sites More sharing options...
pouic Posted March 9, 2009 at 11:08 PM Report Share #249559 Posted March 9, 2009 at 11:08 PM ok utilizando esse componente também é possível. Mas como não gosto muito desses componentes, evito utilizar 😛 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now