Solved

Creating Multiple Flash Buttons

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Begin mp4 video on first frame 6 184
Rotating Adobe pdf document 4 330
How  to reduce the .AVI file size of 90GB 4 373
Can't enable Flash on Chrome 32 Windows 7 any more 2 48
This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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 how to record live broadcast.

733 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