Making a background selection?
- kokonut10
-
kokonut10
- Member since: Jun. 16, 2007
- Offline.
-
- Forum Stats
- Member
- Level 32
- Gamer
I am trying to make a game where you can choose from eight different backgrounds, but I don't know how to make it work. I've got two buttons for next and back, and the backgrounds, but I'm not sure how to get it all to work. Can someone give me some help?
- Denvish
-
Denvish
- Member since: Apr. 25, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (15,977)
- Block
-
- Forum Stats
- Member
- Level 46
- Blank Slate
At 2/11/09 03:49 AM, kokonut10 wrote: I am trying to make a game where you can choose from eight different backgrounds, but I don't know how to make it work. I've got two buttons for next and back, and the backgrounds, but I'm not sure how to get it all to work. Can someone give me some help?
Put them on separate frames inside a movieclip. Put the movieclip on stage and give it the instance name 'BG'. On the forward button, use
on(press){BG.nextFrame();}
on the back button:
on(press){BG.prevFrame();}
- kokonut10
-
kokonut10
- Member since: Jun. 16, 2007
- Offline.
-
- Forum Stats
- Member
- Level 32
- Gamer
It didn't work...I gave the backgrounds the instance name and made the buttons with the AS on them, and nothing happened when they were clicked. :(
- Yambanshee
-
Yambanshee
- Member since: Oct. 5, 2008
- Offline.
-
- Forum Stats
- Member
- Level 11
- Blank Slate
are you sure? IMO that is the right script. Make sure that your background MC has a stop() command on every frame, and that your caps is right on the instance name


