?
Solved

Creating Multiple Flash Buttons

Posted on 2003-11-06
5
Medium Priority
?
406 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
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…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 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