Ok. I finally finsihed my first game but have one slight problem. The timeline refuses to move from frame 4 to frame 5 which contains text and a button which should takes you to frame 6. I don’t understand why this doesn’t happen as I’ve used the same code and method for frames 2-3.
This is the code I've used on frame 4:
stop();
// initialise variables
bulletNum = 0;
dropdown = false;
speed = 15;
_root.bombspeed = 0.1;
initAliens("bug");
//
// ----------- ONLOAD ----------- //
_root.onLoad = function() {
Mouse.hide();
};
//
// ------------- ENTERFRAME ---------- //
_root.onEnterFrame = function() {
// move the defender with the mouse.
_root.defender._x = _root._xmouse;
_root.defender._y = 385;
// bullet move
var y = 0;
while (y<6) {
eval("_root.bullet"+y)._y -= 30;
y++;
}
moveBombs("bug");
moveAliens("bug", 4,15);
initBombs(_root.bombspeed);
};
//
// ------------- MOUSE CLICK ---------- //
_root.onMouseDown = function() {
// duplicate the bullet mc
attachMovie("bullet", "bullet"+bulletNum, bulletNum);
// set the coords to the mouse clik
eval("_root.bullet"+bulletNum)._x = _root.defender._x;
eval("_root.bullet"+bulletNum)._y = _root.defender._y;
// increment the bullet number
++bulletNum;
// if more than 5 bullets , start again at 0
if (bulletNum>5) {
bulletNum = 0;
}
};
Frame 5 got a simple:
stop();
stopAllSounds();
If anyone can help, I'd be most grateful. This is doing my 'ead in!:smirk:
Yossarian