Movieclips as triggers

OK I try my best to explain this. I have this movieclip (instance name “t1”) i use as a trigger when a car (i_car) hits it. Inside it there is 2 frames. The idea is to get the car going under the bridge when trigged and normally the state is that the car goes above the bridge.

Frame 1:
if (_root.t2.hitTest(_root.i_car)) {
_root.i_bridge.swapDepths(200);
_root.t2._yscale = 300;
_root.track.i_collision.gotoAndStop(3);
} else {
_root.i_car.swapDepths(200);
_root.t2._yscale = 100;
_root.track.i_collision.gotoAndStop(2);
}
Frame 2:
gotoAndPlay(1);

I use this trigger at the end of the bridge. (the road going under it). Problem is when ever i put another similiar trigger movieclip, this new trigger doesn’t work. I just can’t find the reason why it wont work.
This first trigger works fine.

Ok i solved the problem and here’s the solution if someone is interested.

I added this script to the first trigger movieclip:
onClipEvent (enterFrame) {
if (this.hitTest(_root.i_car)) {
_root.i_bridge.swapDepths(100);
this._yscale = 300;
_root.track.i_collision.gotoAndStop(3);
} else {
if (_root.t2.hitTest(_root.i_car)) {
_root.i_bridge.swapDepths(100);
_root.t2._yscale = 300;
_root.track.i_collision.gotoAndStop(3);
} else {
_root.i_car.swapDepths(100);
this._yscale = 100;
_root.t2._yscale = 100;
_root.track.i_collision.gotoAndStop(2);
}
}
}
----------------------- end -----------------

Now there is another trigger movieclip too (t2) and it works. Both of them:)

For those who are interested what i needed that thing for:

http://pixeli.pkky.fi/~meronen/AnokiRacer/beta06.html

A bridge test. sorry that it is so big on screen but it’s just a test really hehe.

why dont you make the bridge a diferent movieClip, and apply that ac when the car goes down the bridge. if i was youm this i will do :slight_smile: i hope i gave you a ideea.

I did. (i_bridge) is the bridge’s movieclip instance name : ) And as i said it works now.

i tested know, and when i go under the bridge the car is out.

ok, know it is working…