2012-09-11 4 views
1

ActionScript를 처음 사용하기 때문에 간단한 내용을 묻고 싶습니다.오류 # 1034 : 형식 강제 변환에 실패했습니다. 변환 할 수 없습니다. flash.display.MovieClip

import flash.display.MovieClip; 
var WinsRM:Array = new Array (protomanwin); 
var Robotmaster:MovieClip = new MovieClip; 
Robotmaster = WinsRM[0]; 
addChild(Robotmaster); 
Robotmaster.y = 250; 
Robotmaster.x = 70; 

없음 컴파일러 오류 그러나 나는이 오류를 얻을 :

TypeError: Error #1034: Type Coercion failed: cannot convert protomanwin$ 
         to flash.display.MovieClip. 

protomanwin 많은 프레임 무비 클립입니다. 나는 틀린 것을 모른다. 기호가 표시되지 않습니다. 또한 앞으로 하나 이상의 심볼을 호출하기 때문에 배열을 사용합니다.

답변

1

"protomanwin"은 라이브러리의 자산 이름 인 것으로 보입니다. 이 경우, "protomanwin는"클래스를 입력, 그래서 대신 Robotmaster 할당을하는 당신이 바로 지금, 당신은이 작업을 수행해야한다 : 동영상 클립의 단일 인스턴스 이상을 할 수

Robotmaster=new WinsRM[0](); 

주 너는해야한다.

+0

조언 해 주셔서 감사합니다. 그것의 마지막 작동! –