Solved

Creating Multiple Flash Buttons

Posted on 2003-11-06
5
359 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
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…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now