<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=Flash_%2F_Flex_%2F_ActionScript%2FTextField%2Ffocus</id>
		<title>Flash / Flex / ActionScript/TextField/focus - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://wbex.ru/index.php?action=history&amp;feed=atom&amp;title=Flash_%2F_Flex_%2F_ActionScript%2FTextField%2Ffocus"/>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/TextField/focus&amp;action=history"/>
		<updated>2026-04-04T15:53:31Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/TextField/focus&amp;diff=4504&amp;oldid=prev</id>
		<title> в 09:19, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/TextField/focus&amp;diff=4504&amp;oldid=prev"/>
				<updated>2010-05-26T09:19:12Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 09:19, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/TextField/focus&amp;diff=4505&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://wbex.ru/index.php?title=Flash_/_Flex_/_ActionScript/TextField/focus&amp;diff=4505&amp;oldid=prev"/>
				<updated>2010-05-26T08:14:52Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Assigning Focus to a Text Field==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package {&lt;br /&gt;
  import flash.display.Sprite;&lt;br /&gt;
  import flash.text.TextField;&lt;br /&gt;
  import flash.text.TextFieldType;&lt;br /&gt;
  import flash.events.MouseEvent;&lt;br /&gt;
  public class Main extends Sprite {&lt;br /&gt;
    public function Main(  ) {&lt;br /&gt;
      var field:TextField = new TextField(  );&lt;br /&gt;
      field.border = true;&lt;br /&gt;
      field.background = true;&lt;br /&gt;
      field.type = TextFieldType.INPUT;&lt;br /&gt;
      addChild(field);&lt;br /&gt;
      var button:Sprite = new Sprite(  );&lt;br /&gt;
      button.graphics.lineStyle(  );&lt;br /&gt;
      button.graphics.beginFill(0xFFFFFF);&lt;br /&gt;
      button.graphics.drawRect(0, 0, 100, 50);&lt;br /&gt;
      button.graphics.endFill(  );&lt;br /&gt;
      button.addEventListener(MouseEvent.CLICK, onClick);&lt;br /&gt;
      button.y = 100;&lt;br /&gt;
      addChild(button);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    private function onClick(event:MouseEvent):void {&lt;br /&gt;
      stage.focus = TextField(getChildAt(0));&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting the Insertion Point in a Text Field==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
package {&lt;br /&gt;
  import flash.display.Sprite;&lt;br /&gt;
  import flash.text.TextField;&lt;br /&gt;
  public class Main extends Sprite {&lt;br /&gt;
    public function Main(  ) {&lt;br /&gt;
      var field:TextField = new TextField(  );&lt;br /&gt;
    &lt;br /&gt;
        stage.focus = field;                  // Set the focus to the text field&lt;br /&gt;
        field.text = &amp;quot;this is example text&amp;quot;;  // Set the text value&lt;br /&gt;
        field.setSelection(0, 0);&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        trace(field.caretIndex);&lt;br /&gt;
        addChild(field);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==To remove focus from a text field you should assign Stage.focus the null value==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
package {&lt;br /&gt;
  import flash.display.Sprite;&lt;br /&gt;
  import flash.text.TextField;&lt;br /&gt;
  import flash.text.TextFieldType;&lt;br /&gt;
  import flash.events.MouseEvent;&lt;br /&gt;
  public class Main extends Sprite {&lt;br /&gt;
    public function Main(  ) {&lt;br /&gt;
      var field:TextField = new TextField(  );&lt;br /&gt;
      field.border = true;&lt;br /&gt;
      field.background = true;&lt;br /&gt;
      field.type = TextFieldType.INPUT;&lt;br /&gt;
      addChild(field);&lt;br /&gt;
      var button:Sprite = new Sprite(  );&lt;br /&gt;
      button.graphics.lineStyle(  );&lt;br /&gt;
      button.graphics.beginFill(0xFFFFFF);&lt;br /&gt;
      button.graphics.drawRect(0, 0, 100, 50);&lt;br /&gt;
      button.graphics.endFill(  );&lt;br /&gt;
      button.addEventListener(MouseEvent.CLICK, onClick);&lt;br /&gt;
      button.y = 100;&lt;br /&gt;
      addChild(button);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    private function onClick(event:MouseEvent):void {&lt;br /&gt;
      stage.focus = null;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
        &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>