간단한 카운터를 사용하고 현재 카운트를 텍스트 상자에로드하려면 어떻게해야합니까?간단한 카운터를 사용하고 현재 카운트를 텍스트 상자에로드하고 싶습니다.
내 코드 :
count1 = new Timer(count);
count1.addEventListener(TimerEvent.TIMER,stopWatch);
count1.start();
private function stopWatch(event:TimerEvent):void{
var myTextBox:TextField = new TextField();
myTextBox.text = count1.currentCount;
addChild(myTextBox);
}
결과 오류 :
1067: Implicit coercion of a value of type int to an unrelated type String.
질문을 편집 할 때 페이지의 오른쪽에있는 코드 서식 지정 지침을 따르십시오. –