Hey all, just working on making my footer playable. got the ship shooting and moving ok, though i would like the ship to only move in the x axes. what do i have to add to this code used to replace the mouse and move the ship_mc.
anyone ?? it basically the tutorial from kirupa , crab shooting.
and i wanted to constrain the ship to the x axes. so it can only go left and right. any help will be appreciated.
edit:: this is in flashMX, sorry about not posting that in the threadname.
sorry for not replying alethos . the fla looks fine, thanx for that, from what i can see is that you have drawn a stroke as reference and gave it a instance name
(xBoundary) and use some code to call this and tell where the mc is contrain to. if your up 2 it, i wouldnt mind if you elaborate on what u did .
:: and also just wondering why youleft frame one and placed everything on frame2?
Well, first of all, the file I got from you had nothing in frame1…so I just figured that’s how you wanted it.
Ok, when you had the ship follow the mouse in both x and y, every click of the mouse would obviously hit the ship, which is a button that triggers the shooting.
But when you constrain to x, the mouse is not always over the ship when clicking, so the shooting is not triggered. What I did was edit the ship button by adding a hit state that covers the whole movie. That way, as long as the mouse cursor was in the movie, any click would trigger the shooting.
I used the xBoundary mc just to define how far side-to-side the ship could go.
Finally, I also editted the shots so that they start at the ship’s nose, instead of it’s tail.