Flash Buttons
Page 1 of 11 Replies - 870 Views - Last Post: 01 March 2008 - 04:25 AM
#1
Flash Buttons
Posted 01 February 2008 - 01:12 PM
I'm trying to create a navbar, and I create a button, and in the button it has 3 layers to it (text, reflection...which I'm still puzzling over, and color). How would I make this button a template, so that when I change the text in the layer, it does change ALL of the instances at the same time, just the one that is currently being edited? Thanks for the help in advance
.
Replies To: Flash Buttons
#2
Re: Flash Buttons
Posted 01 March 2008 - 04:25 AM
In the future, please indicate the version of ActionScript that you are using (2 or 3).
At this point, I can only help you with ActionScript 2
With that being said...
Select the text field inside the button and using the Properties window apply the following settings to it:
From here you can do it either of the two ways:
A.
With the button selected, open the Properties window and verify that Instance behavior is NOT set to Graphic
With the button still selected, open the Actions window and paste the following code there:
Make a copy of that button, select it, paste the same code in the actions window but change "home" to anything you like. Repeat this procedure for as many buttons as you need.
B.
Alternatively, you can first make copies of the button, (again make sure they are not set to be Graphic), give each duplicate and instance name. Create a new empty layer, open the Actions window.
Now, assuming you created 3 copies of the button and gave them the following instance names : home, products, contact, write the following ActionScript code:
The changes to the buttons' texts will not be reflected until you test or export the movie.
Questions?
At this point, I can only help you with ActionScript 2
With that being said...
Select the text field inside the button and using the Properties window apply the following settings to it:
- Set text type to Dynamic
- In the Instance Name field type buttonText
- Click the Embed button and embed characters according to your needs (Basic Latin should do fine).
From here you can do it either of the two ways:
A.
With the button selected, open the Properties window and verify that Instance behavior is NOT set to Graphic
With the button still selected, open the Actions window and paste the following code there:
onClipEvent(load)
{
buttonText.text = "home";
}
Make a copy of that button, select it, paste the same code in the actions window but change "home" to anything you like. Repeat this procedure for as many buttons as you need.
B.
Alternatively, you can first make copies of the button, (again make sure they are not set to be Graphic), give each duplicate and instance name. Create a new empty layer, open the Actions window.
Now, assuming you created 3 copies of the button and gave them the following instance names : home, products, contact, write the following ActionScript code:
home.buttonText.text = "HOME"; products.buttonText.text = "PRODUCTS"; contact.buttonText.text = "CONTACT";
The changes to the buttons' texts will not be reflected until you test or export the movie.
Questions?
Attached File(s)
-
Akelo.zip (4.84K)
Number of downloads: 52
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|