Solved

Dynamic Text within a Button?

Posted on 2003-10-22
2
190 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 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…

776 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