Be a Supporter!

xscale crap

  • 287 Views
  • 2 Replies
New Topic Respond to this Topic
linc186
linc186
  • Member since: Jun. 17, 2009
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
xscale crap 2010-03-06 23:53:33 Reply

how to i make an object's x and y scale increase when i hit a button?
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
x, y scale stuff?
}


BBS Signature
Montycarlo
Montycarlo
  • Member since: Mar. 14, 2005
  • Offline.
Forum Stats
Member
Level 24
Blank Slate
Response to xscale crap 2010-03-07 00:23:35 Reply

_xscale += 5 // Add 5
_xscale *= 1.5 // 150%

Although practicality beats purity.
Errors should never pass silently.
In the face of ambiguity, refuse the temptation to guess.

Neo-13
Neo-13
  • Member since: Jun. 9, 2007
  • Offline.
Forum Stats
Member
Level 23
Programmer
Response to xscale crap 2010-03-07 06:47:18 Reply

100 is the normal size. If you make it negative, it flips. i.e. -100 would be normal proportions/size but a horizontal/vertical flip depending on whether it was _xscale or _yscale.


BBS Signature