Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dynamic Text within a Button?

Posted on 2003-10-22
2
Medium Priority
?
221 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 2000 total points
ID: 9601801
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
ID: 9602048
Thanks Calron.  I did as you said, and things are working just fine.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

773 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