goaganesha
Programmer
Hi
I'm building a videogame like space invaders which visitors can play while waiting for the whole movie to load.
I have a movieclip (let's call it mc1) at the top of the screen which moves from left to right and goes one step down when it reaches the right or left edge. In this movieclip I have placed different movieclips (representing the bad guys (mc2,3.etc). I want to get the _x position of each of those bad guys so I can position each shot they fire right in front of that particular bad guy.
In the objectpanel of the shot I tried to use these codes:
//=======================
this._x = _root.mc2._x;
//=======================
and
//=========================
this._x = _root.mc1.mc2._x;
//=========================
but neither of them does the trick.
If I place all the bad guys within a graphic symbol, the first line of code works. But then I have to use a motion tween to let that graphic symbol move from left to right and one step down which isn't very practical.
Can anyone tell me how to get the _x position of a movieclip in another movieclip?
Thanx for your help.
Regards, Goaganesha
I'm building a videogame like space invaders which visitors can play while waiting for the whole movie to load.
I have a movieclip (let's call it mc1) at the top of the screen which moves from left to right and goes one step down when it reaches the right or left edge. In this movieclip I have placed different movieclips (representing the bad guys (mc2,3.etc). I want to get the _x position of each of those bad guys so I can position each shot they fire right in front of that particular bad guy.
In the objectpanel of the shot I tried to use these codes:
//=======================
this._x = _root.mc2._x;
//=======================
and
//=========================
this._x = _root.mc1.mc2._x;
//=========================
but neither of them does the trick.
If I place all the bad guys within a graphic symbol, the first line of code works. But then I have to use a motion tween to let that graphic symbol move from left to right and one step down which isn't very practical.
Can anyone tell me how to get the _x position of a movieclip in another movieclip?
Thanx for your help.
Regards, Goaganesha