좋아,이 오류는 addchild() 기능과 관련이 있기 때문에 발생하는 것으로 알고 있습니다. 프레임 2. 어떻게 알 수 있습니까? 동적으로 객체를 스테이지에 배치하는 코드 스 니펫을 제거하면 잘 동작하기 때문입니다. 오류는 아래에 있으며 프레임 2의 소스 코드는 오류 메시지 아래에 있습니다. 오류 코드플래시 응용 프로그램을 실행하는 동안 오류 # 1034
TypeError: Error #1034: Type Coercion failed: cannot convert 0 to flash.display.DisplayObject.
at fl.motion::AnimatorBase/play()
at fl.motion::AnimatorBase$/processCurrentFrame()
at fl.motion::AnimatorBase/handleEnterFrame()
at flash.display::MovieClip/nextFrame()
at Lemonade_fla::MainTimeline/begin()[Lemonade_fla.MainTimeline::frame1:27]
TypeError: Error #1034: Type Coercion failed: cannot convert 0 to
FRAME 2 CODE
flash.display.DisplayObject.
stop();
var guide_tut:guide = new guide();
addChild(guide_tut);
//stand.addEventListener(MouseEvent.CLICK, check);
addEventListener(Event.ENTER_FRAME, check);
function check(ev : Event) : void {
cash.text.text = cash1;
lemons_count.text.text = lemons1;
cups_count.text.text = cups;
straws_count.text.text = straws;
ice_count.text.text = ice;
}
shop_mc.addEventListener(MouseEvent.CLICK, shopnow);
function shopnow(event:MouseEvent):void{
nextFrame();
}
코드 무엇입니까 확장 프레임 1 라인 27 에서요? – Sam
또한이 줄은 무엇입니까? '실제로 오류 essage의 일부 처음 두 줄 oopse 첫 번째 줄 – Sam
flash.display.DisplayObject.'. 그냥 무시하십시오. 프레임 2의 첫 번째 코드 행은 var guide_tut입니다. guide = new guide(); –