A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: >>> variables with text <<<

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38

    >>> variables with text <<<

    with numbers i used:

    on (press) {
    score = Number(score)+1;


    but if i want to write something as "correct"???

    thanks

  2. #2
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38
    pllleaze....can any1 help me???

    i explain better...

    i put a dynamic text on the stage...i give it a var label "heart"...

    when i press on a button it has to write in this dynamic text the word "Jonny"....

    how can i do?

    thanX

  3. #3
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    _level0.heart="Jonny"
    gparis

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38
    Originally posted by gparis
    _level0.heart="Jonny"
    gparis
    that was i made...but it writes the word even if i click on another button! instead it has to write it only if i click on the relative btn!

  5. #5
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    because you entered that code as a frame action. enter that same action ON the button.
    gparis

  6. #6
    Member
    Join Date
    Jan 2003
    Location
    CPU
    Posts
    38
    Originally posted by gparis
    because you entered that code as a frame action. enter that same action ON the button.
    gparis
    no!

    i put
    on (press) {
    score = Number(score)+1;
    bart = Number(bart)+1;
    _level0.heart="Jonny"

    }

  7. #7
    Member
    Join Date
    Dec 2002
    Posts
    62
    Yeah, thats right, but to make it vanish when you click on another button (i think thats your problem??), you have to put this on the other button...
    _level0.heart=""
    That will make the dynamic text show nothing, :. meaning that the area is now empty.
    there are two things that make true happiness!

    Love and Actionscript!

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