Hacer que el cursor permanezca junto al último carácter

  • Una conectada
  • Born
  • Born
  • No Avatar
  • Registrado: Nov 30, 2012
  • Mensajes: 2
  • Status: Offline

Nota Noviembre 30th, 2012, 8:04 am

Hello friends.

When we introduced some characters in a text box for input in Flash MX 2004 Professional and click outside the text box lose focus. By the time I managed to regain focus in the same text box, but which had already introduced characters I selected. What I want is that the focus on the text box that is active, but the cursor appears to the next can be recovered to the last character we have introduced, so that we can continue with the introduction of text.

Can someone help me?

Many thanks in advance.

A greeting
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Noviembre 30th, 2012, 8:04 am

  • Zealous
  • Guru
  • Guru
  • Avatar de Usuario
  • Registrado: Abr 15, 2011
  • Mensajes: 1192
  • Loc: Sydney
  • Status: Offline

Nota Diciembre 2nd, 2012, 3:59 am

hay más información que se puede agregar como ejemplos de código fuente o más problema.
  • Una conectada
  • Born
  • Born
  • No Avatar
  • Registrado: Nov 30, 2012
  • Mensajes: 2
  • Status: Offline

Nota Diciembre 3rd, 2012, 9:55 am

Entiendo que puede ser un poco confuso. Es un poco difícil de explicar. Al introducir texto en un cuadro de texto de entrada, aparece un cursor que parpadea siempre después del último carácter que hemos introducido (por ejemplo, cuando Im escribir ahora). Bien, en Flash cuando hacemos clic fuera del cuadro que estaba escribiendo, el cursor desaparece, lo que quiero es poder restablecer el cursor a la posición para que no perdamos el foco y podemos seguir escribiendo.

Espero que sea más claro ahora.

Gracias otra vez.

Un saludo.
  • ScottG
  • Proficient
  • Proficient
  • No Avatar
  • Registrado: Jul 06, 2010
  • Mensajes: 260
  • Status: Offline

Nota Diciembre 17th, 2012, 12:42 pm

En 3 de secuencia de comandos de acción podrá hacerlo
ACTIONSCRIPT Código: [ Select ]
stage.focus = instanceName;
 
  1. stage.focus = instanceName;
  2.  

Esto restaurará el cursor a la última posición antes el enfoque perdido de la caja el texto.

Si usted todavía quería que fuera al final, a continuación, usted podría hacer
ACTIONSCRIPT Código: [ Select ]
instanceName.setSelection(instanceName.text.length, instanceName.text.length);
 
  1. instanceName.setSelection(instanceName.text.length, instanceName.text.length);
  2.  


Si lo necesita en acción Script 2 Id tiene que volver a usted a que su pasado un rato desde Ive codificado en AS2
Attachments:
test.zip

(6.05 KiB) 93 veces

  • ScottG
  • Proficient
  • Proficient
  • No Avatar
  • Registrado: Jul 06, 2010
  • Mensajes: 260
  • Status: Offline

Nota Diciembre 17th, 2012, 1:04 pm

En 2 de secuencia de comandos de acción sería algo así como
ACTIONSCRIPT Código: [ Select ]
Selection.setFocus(instanceName);
Selection.setSelection(instanceName.text.length, instanceName.text.length);
 
  1. Selection.setFocus(instanceName);
  2. Selection.setSelection(instanceName.text.length, instanceName.text.length);
  3.  
Attachments:
test2.zip

(6.82 KiB) 89 veces

Publicar Información

  • Total de mensajes en este tema: 5 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 38 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC