Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Creating Multiple Flash Buttons

Posted on 2003-11-06
5
Medium Priority
?
409 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

610 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