|
 |
|
|
|
|
|
Description:
There are a number of methods to achieve this, but here is a simple method which can help you to achieve this quickly when you are making templates for customers. Here are the steps to do, I am making an example with only 2 buttons.
Method:
1. Make 2 buttons (Home and About) 2. Now make two DUMMY rectangles (same as buttons, two rectangles of same size of your buttons) 3. Group all of them to SPRITE (rename sprite to "all_buttons")
Now we have to do all this in this sprite, we have adopted SPRITE method becuase we know there can be more sprites for different pages so we are making it more easy to edit any part of the template.
We will achieve this simply by using PLACE and REMOVE effect. Now as in this example we are using only 2 buttons and we want when we RUN swf, only the ABOUT button should be enabled and the HOME button should be disabled by default, becuase we are displaying the HOME button details. This can be a simple TEMPLATE with 2 buttons, when you click any button it will be disabled and the other one will be enabled. HOME button is disabled by default in this example.
4. Put a STOP action on Frame number 0 of BUTTONS sprite. 5. Now, put a PLACE effect in front of ABOUT button on FRAME number 0 and put a REMOVE effect on FRAME number 1. 6. Put a REMOVE effect in front of HOME button on FRAME 0 and put a PLACE effect on FRAME 1.
now we have to display DUMMY buttons which are fake buttons (just rectanlges)..
7. Now, put a PLACE effect in front of HOME dummy button on FRAME 0, and REMOVE on frame 1. 8. Again put a REMOVE effect in front of ABOUT dummy button on FRame 0, and use REMOVE effect on frame 1.
So all of these PLACE and REMOVE effect will look like this:

Now we have to put action for buttons,
9. For HOME button use action GOTO Frame 1. 10. For ABOUT button use action GOTO Frame 0.
You can achieve this easily within SWiSHMax by using the following script.. buttonName.enabled = false;
where buttonName is the name of your button.
The zip file is attached below, if you have any questions, feel free to ask. I have writen this quick tutorial becuase there were a number of questions asked for this specific trick, so I thought it may help anyone.
Download Example
Regards,
@Zahra
|
|
|
|