Solved

Creating Multiple Flash Buttons

Posted on 2003-11-06
5
385 Views
Last Modified: 2010-04-03
I am constantly creating Flash sites that contain a number of buttons that act the same way but have different text on them. For example, I Have created a button that is gray text, that turns red in the over state, then black on click. I have about 90 buttons to create with different text. Right now, I create a Gray graphic (graphic1) that I lace it in the first frame of a button (button1). I change the tint on the Over frame to Red, and on the Down frame to Black. Then I duplicate "graphic1", name it "graphic2", change the text. Then duplicate "button1", rename it "button2" and swap each frame with graphic2. I do this over and over to get the 90 buttons done. There must be an easier way to do this! Please help.

Also, if the button has a box around it, is there a way to automate the resizing of the box to fit the new text in each of the buttons?

Thank you in advance.

Ozzie
0
Comment
Question by:Ozwald
  • 2
  • 2
5 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 9697520
1. are you using flash 5 or mx?
2. if first yes, do you know anything about smart clip? if second, about components?
0
 

Author Comment

by:Ozwald
ID: 9697860
Flash MX. Don't know about Smart Clip or Components (unless I just don't know the name.)
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9697994
Well, i could create an example for you, but maybe would be hard to understand unless you read something here: http://www.flashcomponents.net/tutorials/triangle/triangle.html
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 250 total points
ID: 9699933
Here's a simple layman's solutions.

Why don't you simulate a button with a movieclip, ie. create 3 frames each with the up/over/down states of the button.
then create a new layer with a dynamic text field, with an instance name.
then create another layer ontop of that with an invisible button with the code:

on (rollOver) {
      gotoAndStop(2);
}
on (rollOut) {
      gotoAndStop(1);
}
on (press) {
      gotoAndStop(3);
}

to simulate the button actions.
then on the movieclip put a simple onclipevent ie.

onClipEvent(load) {
      this.btnLabel.text = "whatever";
}
0
 

Author Comment

by:Ozwald
ID: 9716628
Thanks, fellas!! NEGATYVE, I tried wading through the URL you sent me to but couldn't get through it. I'll check back with it as I learn more about Flash but at this point it's above my head.

Ozzie
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question