A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Dynamic text box showing global variable in a button

  1. #1
    Junior Member
    Join Date
    May 2010

    Unhappy Dynamic text box showing global variable in a button


    I have a button, and inside the button, i have a dynamic text field that i want to display a global variable in the "over" frame. (when the mouse goes over the button)

    Normally, to make a dynamic text field show a global variable, I put the dynamic text box INSIDE a movie clip, and then define the variable in the movie clip.

    For example, i would put this into the movie clip containing the dynamic text box:
    onClipEvent(enterFrame) {
    variable = _global.variable

    Inside a button though, it doesn't work! I'll leave an attachment as an example of what I want.

    thanks in advance!!

    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2008



    Your problem has fixed but to be honest, your problem was wonderful!

    I tried all ways and got no answer, but when I changed fonts of your Dynamic text, it fixed! I changed it from "Comic sans" to "Tahoma" and now, it works!

    of course, I used "Embed" feature in "Character" part (in properties pane) and checked Numerious, and it helped me too.You know why?

    because when I used String, the dynamic text button showed it but when I assign number, like 20, it broke!

    Anyway, I attach the true file here, check it.

    Totally, I changed the fonts, their Embed Character and a little your codes and it fixed.

    Check it

    Attached Files Attached Files

  3. #3
    Join Date
    Aug 2008
    Please note that my atatched file is Flash CS4

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center