Solved

Dynamic Text within a Button?

Posted on 2003-10-22
2
173 Views
Last Modified: 2010-04-03
I am going crazy!  I am trying to change the text in a dynamic text field that is within a button object.

Is it IMPOSSIBLE to change the text of a dynamic text field that is within a button?

the important part of code is something like.

<currentmovie>.<instanceNameOfMyButton>.<fieldName>.text = "UPDATED"

If I keep my code the same, but change the button object to a movieclip, I can change the text.

<currentmovie>.<instanceNameOfMyMovieClip>.<fieldName>.text = "UPDATED"

What am I doing wrong?
0
Comment
Question by:fatttymelt
2 Comments
 
LVL 5

Accepted Solution

by:
Calron earned 500 total points
Comment Utility
With buttons flash hides the content of the button and does not let you access it.  (Have a look at it in debug mode and switch the button to a movieclip)

So if you need a button where you can dynamically change the label you will have to set up a movieclip as a button. YOu can do this by adding several frames and stopping the movie in specific positions. Wait for events i.e. on (rollOver), rollOut, release, mousePress, and move the clip to the correct frame. That way you have a movieclip that behaves like a button and you can change the caption.
0
 
LVL 1

Author Comment

by:fatttymelt
Comment Utility
Thanks Calron.  I did as you said, and things are working just fine.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
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…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

728 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

14 Experts available now in Live!

Get 1:1 Help Now