Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Dynamic Text within a Button?

Posted on 2003-10-22
2
Medium Priority
?
217 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
[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 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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 which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

715 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