hace poco decidi actualizar mi sitio web ,entre muchas alternativas decidi hacer una interfase en flash,con un campo de texto en que se desplace con el mouse a manera de scrollbar,desgraciadamente no lo he podido lograr y he enfrentado en cada caso diversos problemas:
caso#1
cheque este tutorial:
http://www.cristalab.com/tutoriales/42/tutorial_de_uso_del_componente_textarea_de_flash_mx_2004
en el tutorial explica como usar el componente text area usando esto:
Pon un componente TextArea en un tu biblioteca
(tal vez mi primera duda es si es cargar el componente a tu biblioteca se refiera a ponerlo en el escenario ,ya que ningun componente se incluye en la biblioteca si antes no se agrega a el escenario)
, y vamos a ver sus propiedades mediante este código:
//Atacheamos el componenteattachMovie("TextArea", "mi_texto", 1);//Propiedadesmi_texto.setSize(300, 200);mi_texto.editable = true;mi_texto.html = true;mi_texto.maxChars = null;mi_texto.password = false;mi_texto.restrict = "^aeiou";mi_texto.wordWrap = true;mi_texto.vScrollPolicy = "on";mi_texto.hScrollPolicy = "off";//Textomi_texto.text = "<p>The properties of the <b>TextArea</b> class allow you to set the text content,
formatting, and horizontal and vertical position at runtime.You can also indicate
whether the field is editable, and whether it is a '<i>password</i>' field. You
can also restrict the characters that a user can enter.</p><br><p>Setting a property
of the TextArea class with ActionScript overrides the parameter of the same name set in
the <b>Property inspector</b> or <b>Component Inspector panel</b>.</p><br><p>The
<b>TextArea</b> component overrides the default Flash Player focus rectangle and draws
a custom focus rectangle with rounded corners.</p><p>The <b>TextArea</b> component
supports <i>CSS styles</i> and any additional HTML styles supported by Flash Player.
</p><br><p>Each component class has a version property which is a class property. Class
properties are only available on the class itself. The version property returns a
string that indicates the version of the component. To access the version property,
use the following code:</p><br><pre>trace(mx.controls.TextArea.version)</pre>";
aqui existe otra confusion demasiado grande ya que al agregar el componente y aplicarle el codigo me aparece el siguiente mensaje en el debugger:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 17: Unexpected 'and' encountered
formatting, and horizontal and vertical position at runtime.You can also indicate
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 18: Syntax error.
whether the field is editable, and whether it is a '<i>password</i>' field. You
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 19: Syntax error.
can also restrict the characters that a user can enter.</p><br><p>Setting a property
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 20: Syntax error.
of the TextArea class with ActionScript overrides the parameter of the same name set in
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 21: Syntax error.
the <b>Property inspector</b> or <b>Component Inspector panel</b>.</p><br><p>The
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 22: Operator '<' must be followed by an operand
<b>TextArea</b> component overrides the default Flash Player focus rectangle and draws
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 21: Statement must appear within on/onClipEvent handler
the <b>Property inspector</b> or <b>Component Inspector panel</b>.</p><br><p>The
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 23: Syntax error.
a custom focus rectangle with rounded corners.</p><p>The <b>TextArea</b> component
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 24: Syntax error.
supports <i>CSS styles</i> and any additional HTML styles supported by Flash Player.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 25: Operator '<' must be followed by an operand
</p><br><p>Each component class has a version property which is a class property. Class
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 24: Statement must appear within on/onClipEvent handler
supports <i>CSS styles</i> and any additional HTML styles supported by Flash Player.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 26: Syntax error.
properties are only available on the class itself. The version property returns a
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 27: Syntax error.
string that indicates the version of the component. To access the version property,
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 28: Syntax error.
use the following code:</p><br><pre>trace(mx.controls.TextArea.version)</pre>";
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 26: Statement block must be terminated by '}'
properties are only available on the class itself. The version property returns a
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 28: Syntax error.
use the following code:</p><br><pre>trace(mx.controls.TextArea.version)</pre>";
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 20: There is no property with the name 'ActionScript'.
of the TextArea class with ActionScript overrides the parameter of the same name set in
Total ActionScript Errors: 17 Reported Errors: 17
ahora,he intentado tambien editarlo directamente pero esto solo se puede hacer usando el property inspector ya que esta ha sido la unica forma en la que queda pero no me sirve por que lo malo de usar el componente es que usa colores predefinidos que son blancos y yo lo necesito de color gris oscuro o negro
[/b]
