0
클래스에 연결되어 배열로 가져온 하위 동영상 클립의 애니메이션을 어떻게 변경합니까?Manage class MovieClip
은 지금은 선수가 안타 때이 라인, 그것을 사라지게 할 수 있어요 : 그것을 봐가있는
this.parent.removeChild(this);
, 외부 등으로 가져온 2 개 광산이있다. 파일이며 MineList 배열에 있습니다.
http://teroute.com/stronghold/index.php?page=secret-project
나는 만졌을 때 그 광산 폭발 할 수 있도록합니다. 여기
자세한 코드 : 등이다
여기for (var i:int = 0; i < MineList.length; i++) // Here i count all mines, that are in MineList Array
{
if(player.hitTestObject(MineList[i])) // If player touches any mine
{
MineList[i].removeSelf(); // If player touches a mine,
// then this mine will dissapear
}
}
removeSelf 기능. 외부 파일 :
this.parent.gotoAndPlay(2);
하지만 내가 잘못, 도와주세요하고 있어요 :
this.parent.removeChild(this);
같은 사람 :
public function removeSelf():void
{
trace("Removed");
removeEventListener(Event.ENTER_FRAME, loop) // Sustabdyti loop
this.parent.removeChild(this); // panaikinimas
}
나는이 라인을 변경해야한다고 생각.