Be a Supporter!

how do I use xscale

  • 377 Views
  • 5 Replies
New Topic Respond to this Topic
thedo12
thedo12
  • Member since: May. 18, 2007
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
how do I use xscale 2007-06-02 16:06:12 Reply

basicly I want to know how to use it so I can change my characters animations easily but I dont know how, is there a tut on it or something? heres an example of a code I would use it on.

onClipEvent(load){
speed=13; stop();
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)){_x+=speed; gotoAndStop(1);}
if (Key.isDown(Key.LEFT)){_x-=speed; gotoAndStop(1);}
}

onClipEvent(enterFrame){
if (Key.isDown(65)){gotoAndStop(2);}
if (Key.isDown(68)){gotoAndStop(3);}
if (!Key.isDown(68) && !Key.isDown(65)){gotoAndStop(1);
}
}

FappingFriends
FappingFriends
  • Member since: Jun. 2, 2007
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to how do I use xscale 2007-06-02 16:16:12 Reply

Try masturbation.

JeremysFilms
JeremysFilms
  • Member since: Feb. 18, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to how do I use xscale 2007-06-02 16:20:08 Reply

_xscale is a property, just like _x is.

The value of _xscale is to be a percentage, 100 being normal, 50 being half, 200 being double, etc.

So for example, you can make a movie clip with this code on it:

onClipEvent(load){
this._xscale = 50;
}

That would make the movie clip half as wide.

If you used the value of -100, it would be flipped backwards, -50 would flip backwards and make it half as wide.

thedo12
thedo12
  • Member since: May. 18, 2007
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to how do I use xscale 2007-06-02 16:22:12 Reply

great it works for everything but I hate not know what it means can you explain it to me?

Shinki
Shinki
  • Member since: Feb. 14, 2005
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to how do I use xscale 2007-06-02 16:30:13 Reply

_xscale is the percentage of the object's original size.

With a value of 100 it is at its original size (horizontally).
With a value of 50 it is half its original size.
With a value of -100 it is it's original size but mirrored about the registration point.

The same applies for _yscale which is vertical.


SCGMD4 is on the way! @scgmd4
If a picture is worth a thousand words, a game is worth a play.

BBS Signature
thedo12
thedo12
  • Member since: May. 18, 2007
  • Offline.
Forum Stats
Member
Level 04
Blank Slate
Response to how do I use xscale 2007-06-02 16:47:22 Reply

thanks this will be usefull for every game I make