A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: People help me please! AS problem...

  1. #1

    People help me please! AS problem...

    hi! actionscript problem here...

    Code:
    _root.hp_text_player -= random(9)+1;
    	_root.hp_bar_player._xscale = (hp_text_player/30*100);
    How can i get the bold number there to be taken from a var insteed of just writing 1 number...

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    hp_text_player/variable*100

    gparis

  3. #3
    that didnt work.. =/

  4. #4
    Junior Member
    Join Date
    Sep 2006
    Posts
    7
    Try this:


    var Number: my_num = 30;
    var Number: my_other_num = my_num * 100;

    _root.hp_bar_player._xscale = (hp_text_player/my_other_num);


    Just a thought...

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