Be a Supporter!

Making a background selection?

  • 230 Views
  • 3 Replies
New Topic Respond to this Topic
kokonut10
kokonut10
  • Member since: Jun. 16, 2007
  • Offline.
Forum Stats
Member
Level 32
Gamer
Making a background selection? 2009-02-11 03:49:47 Reply

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.
Forum Stats
Member
Level 46
Blank Slate
Response to Making a background selection? 2009-02-11 04:20:52 Reply

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();}


- - Flash - Music - Images - -

BBS Signature
kokonut10
kokonut10
  • Member since: Jun. 16, 2007
  • Offline.
Forum Stats
Member
Level 32
Gamer
Response to Making a background selection? 2009-02-12 14:44:34 Reply

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
Response to Making a background selection? 2009-02-12 14:46:22 Reply

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


AS2||AS3||Motox
Thanks to hdxmike for the sig :]

BBS Signature