Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Button Problem 1

Status
Not open for further replies.

TulsaJeff

Programmer
Jan 29, 2001
870
US
I am trying to create a button using dynamic text boxes that can be updated through actionscript. Here is what I did:

First I created a movie clip with a dynamic text box in the first frame... I named the text box "buttontext". In a separate actions layer I used a setVariable Action to make buttontext equal to "DYNAMIC TEXT"

I then created a new button and dragged the text box MC into each frame, changed the alpha to 50% in the over frame and defined the hit area.

I then dragged the button onto the stage.

My problem is simple...it is not working at all. I can see the text defined by the setVariable action but it has no button properties at all. My mouse pointer is not even changing to a hand except on the very edge of the text box.

My mode of thinking was that I could have a generic button that would have button properties such as color change in the over state or whatever and the text could be quickly changed in the setVariable action.

Is there a better way of doing this? I normally just save my text as a graphic symbol and then insert that into the different button states using effects panel to make color and alpha changes. If I want to change the text of the button I just simply edit the graphic symbol and wham bam it is changed in the entire button.

That works fine but I would like to be able to do this dynamically as well. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
jeff i don't know if this is what you mean but i have made dynamic text a button simply by converting the text into a symbol and making it a button.. the dynamic text being non-selectible and single line..

but if you mean that you wanted to have buttons inside dynamic text boxes that are calling a file to be loaded via the server, you have to make the links inside the file on the server <ahref's...

is that what you mean?.if not sorry..didn't quite understand what you were looking for..
e.gif


carlsatterwhite@endangeredgraphics.com
 
i have made dynamic text a button simply by converting the text into a symbol and making it a button.. the dynamic text being non-selectible and single line

I tried that last night and it didn't work...maybe I had it set as selectable... would that make a difference?

I will try that again tonight and see if I can make it work... I knew it should work but figured there was some kind of little minute error on my part. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
yes jeff making it selectable makes it not work...try this make a button out of dynamic text..make it selectable..then in the hit frame of the button put a huge hitframe object..when you test the button the mouse over button hand will show up on the object that is in the hit frame..but when it actually gets over the text it does not work..it becomes the cursor..

but if you make it non selectable it should work.
e.gif


carlsatterwhite@endangeredgraphics.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top