as3.0 stage.focus 没效果 求帮忙看一下~试了半天。。。
package{importflash.display.MovieClip;importflash.events.MouseEvent;publicclassMainex...
package
{
import flash .display .MovieClip;
import flash .events .MouseEvent ;
public class Main extends MovieClip
{
var startMessage :String ;
var mysteryNumber:uint ;
public function Main()
{
init();
}
function init() :void
{
//初始化变量
startMessage = "I am thinking a number between 1 to 100";
mysteryNumber=50;
//初始化文本字段
output.text=startMessage;
input.text="";
input.backgroundColor = 0xFFCCCCCC;
input.restrict = "0-9";
stage.focus = input;
}
}
} 展开
{
import flash .display .MovieClip;
import flash .events .MouseEvent ;
public class Main extends MovieClip
{
var startMessage :String ;
var mysteryNumber:uint ;
public function Main()
{
init();
}
function init() :void
{
//初始化变量
startMessage = "I am thinking a number between 1 to 100";
mysteryNumber=50;
//初始化文本字段
output.text=startMessage;
input.text="";
input.backgroundColor = 0xFFCCCCCC;
input.restrict = "0-9";
stage.focus = input;
}
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询