si, dichiarato in un frame iniziale, e conta bene xD
forse sto capendo il problema, per ora ho modificato così:
codice:
onClipEvent (enterFrame)
{
// _root["_root.insDupCar"+2].carIndex
// if (this != _level0.insClip1NE)
// _root.tmpDebug = this;
// if (this == _root["_root.insDupCar"+1])
// _root.tmpDebug = this.carIndex;
//carSpawnNum
//carTypeIndex
if (this.carTypeIndex == 1)
// _root.tmpDebug += "A";
{
for (i=1; i<=_root.carCounter; i++)
{
//_root["_root.insDupCar"+type+position+_root.carEstratte[type]].play();
_root.tmpDebug = i;
if (this.carSpawnNum != i)
{
if(this.hitTest(_root["_root.insDupCar"+i]) )
{
this._visible=false;
_root["_root.insDupCar"+i]._visible=false;
_root.tmpDebug = "SIIII!!!";
}
}
}
}
}
e così:
codice:
function insertCar(type, position)
{
_root.carCounter= _root.carCounter + 1;
duplicateMovieClip ("_root.insClip"+type+position, "_root.insDupCar"+_root.carCounter, 10+_root.carCounter);
_root["_root.insDupCar"+_root.carCounter].play();
_root["_root.insDupCar"+_root.carCounter].carSpawnNum = _root.carCounter;
_root["_root.insDupCar"+_root.carCounter].carTypeIndex = type;
}
ancora non funziona, ma vedo progressi