PDA

View Full Version : how to a acknowledge an MC inside an MC



patricktheking
June 3rd, 2004, 09:32 PM
K For my racing game I have movieclips inside other movie clips and I was wondering How u like aknowledge it.... Like example....

onClipEvent (enterFrame) {
if(_root.car.hitTest(_root.hotspot6)){
_root.road.easeXY(307, 315)
} else {
play();
}
}


That is the hittest for 2 moviecips onscreen...not in any other MC.... how do I do it when ones in the MC and another on the main screen.
Example... lets pretend that hotspot6 is in a moviecip "trigger". Do i edit my command like this.....

onClipEvent (enterFrame) {
if(_root.car.hitTest(_root.hotspot6.trigger)){
_root.road.easeXY(307, 315)
} else {
play();
}
}

K i know i havnt done the best job explaining wat i need but if u understand plz.. answer<!-- / message -->

tommythewolfboy
June 4th, 2004, 05:14 AM
Question isn't very clear, but I think if you use the 'Insert a target path' icon in the A/S panel (the target icon) and browse to the movieclip you want, you should get the correct path. Which, in your example, if trigger is the parent of hotspot (i.e. hotspot is inside the trigger mc) the a/s should be:
onClipEvent (enterFrame) {
if(_root.car.hitTest(_root.trigger.hotspot6.)){
_root.road.easeXY(307, 315)
} else {
play();
}
}

patricktheking
June 4th, 2004, 09:48 AM
ooo... k tahts what wanted... tanks