Forum Statistics

  • Forum Members: 4,499
  • Total Threads: 3,656
  • Total Posts: 1
There are 1 users currently browsing forums.

Partner Sites

Reply
Old 04-08-2009, 12:41 AM   #1 (permalink)
 
Status: Newbie
Join Date: Apr 2009
Posts: 6

Rep Power: 13 ramyaparimala is on a distinguished road



Default Swapping buttons or enabling/disabling buttons

Hi,

I recently started using Flash MX and am trying to make a game. I've run into a problem trying to program a button to be disabled on default. Here's what I'm trying to do:

I want a button on the main menu to be disabled until the player plays the game to a certain scene. Once the player reaches that scene, the disabled button becomes enabled, and the player can click on the button now.

I've tried to do button.enable , but that only works if the button is enabled on default, and then disabled later.

I've also had a problem trying to force the button to be disabled on default, where I programmed in the first frame of the main menu to "menubutton.enabled = false", and then going to scene 2 and programming another button there to set "menubutton.enabled = true", and to go back to the main menu.
The problem with this is that once I return to the main menu, I returned to the first frame where i programmed the menubutton to be false, and although my scene 2 button worked, the menubutton is now back to being disabled.

I've tried to do if else statements, but i'm afraid i'm not too familiar with it.

Another solution I've tried is to swap buttons. For example, I'll have a "disabled" button on the main menu, and once the player views the scene, the "disabled" button will be swapped with an "enabled" button. But I don't know if it works with different scenes, and so far I've had no luck.


This is getting pretty frustrating. Any help would be appreciated!


Call Centre Software
fundraising software
ramyaparimala is offline Add Infraction for ramyaparimala   Reply With Quote


Reply

Bookmarks

Tags
None


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.5.0 RC2