Hey,
I'm having a problem which should be fairly easy to explain if you have some time to help a newbie! (again, for some of you)... :P
Here is the beta of the sim game I'm currently working on (my first ever game, I might add!)
http://spamtheweb.com/ul/upload/120508/7 4957_simgame.php
I have a Movie Clip with an instance name of "bg". Inside it are 3 keyframes (each with a stop action), and each keyframe has a different background for each of the different rooms (living room, bedoom, kitchen). On each keyframe there are buttons which either move the player to another room, or modify a variable's value (such as 'Eat', or 'Watch T.V').
When I run the .swf, I can click the buttons that are within the Movie Clip, and they affect the stats, just as I had planned. When I click the button to leave the living room and enter the kitchen (which is also within the MC) it works fine, and the MC current frame changes from 1 to 2. Perfect!
But this is where my problem begins :(
Everything in this room is exactly the same, except for the appearance and buttons being different, but I'm talking about how the AS should function. The buttons in this room, however, do not work!
Here is the code for the button on frame(1) inside the background MC which moves the player into the kitchen:
_root.bg.buttonKitchen.onPress = function() {
_root.bg.gotoAndStop(2);
}
And here is the code for the button on frame(2) of the bg MC, which SHOULD move the player back into the living room. But this does not work! :(
_root.bg.buttonLiving.onPress = function() {
_root.bg.gotoAndStop(1);
}
This problem is the same for the other buttons on frame(2).
I know this is probably something really simple that I'm just not noticing o haven't learnt yet, but I've looked through AS: Main unsuccessfuly, and I'm not sure if there is something you have to do or not (code to write) that specifies which frame within the MC the buttons are actually located on.
Is this the case? Could somebody please explain to me what I am supposed to be writing to do this?
Thanks a lot guys, most of you have been a real help so far with my other problems, and it feels like my game is really coming along great :)
I look forward to reading somebody's response! :)
GS