A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Subtracting Random #

  1. #1
    Member
    Join Date
    Jan 2003
    Posts
    45

    Subtracting Random #

    Ok... say if i put
    Math.floor(Math.random() * (20 - 10)) + 10;
    Then i wanted subracted from a dynamic text called BobHP

  2. #2
    forever depreciated™ aaron.martone's Avatar
    Join Date
    Dec 2002
    Location
    Florida, USA
    Posts
    448
    Code:
    myVariable = Math.floor(Math.random() * (20-10)) + 10;
    myTextValue = BobHP.text;
    myResultValue = Number(myVariable) - Number(myTextValue);
    (am)™ :: aaron.martone ::
    http://www.aaronmartone.com

    "I see in layers; I think in ActionScript; Life is my animation and animation is my life.... oh, and I like corn dogs."

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