Forum Topic: Flash Coordinate question

(68 views • 4 replies)

This topic is 1 page long.

<< < > >>
Questioning

CompleteDouche

Reply To Post Reply & Quote

Posted at: 5/24/09 06:22 PM

CompleteDouche DARK LEVEL 09

Sign-Up: 12/01/08

Posts: 652

When i have a hitTest, i want it to set a player to a certain coordinate. Do i set coordinates with _xscale/_yscale, or can i just say _x/_y ?

onClipEvent(enterframe) {
if (this.hitTest(mario)){ 
mario._xscale = x,
 mario_yscale = y}
}

just wondering.

My Name is CompleteDuck, and i'm a CompleteDouche
Goldeneye Club

BBS Signature

Questioning

Goonie

Reply To Post Reply & Quote

Posted at: 5/24/09 06:27 PM

Goonie EVIL LEVEL 40

Sign-Up: 10/13/02

Posts: 3,532

This site may explain your problem.

>:(

BBS Signature

None

Neo-13

Reply To Post Reply & Quote

Posted at: 5/24/09 06:28 PM

Neo-13 LIGHT LEVEL 20

Sign-Up: 06/09/07

Posts: 1,475

At 5/24/09 06:22 PM, CompleteDouche wrote: When i have a hitTest, i want it to set a player to a certain coordinate. Do i set coordinates with _xscale/_yscale, or can i just say _x/_y ?

onClipEvent(enterframe) {
if (this.hitTest(mario)){
mario._xscale = x,
mario_yscale = y}
}

just wondering.

If you use xscale or yscale, you'll change the 'scale' - stretching.

You NEED to use x and y, as these are their coordinates, the xscale and yscale properties relate to the scale of the width and height - i.e. they stretch the MC.

BBS Signature

None

atomoxic

Reply To Post Reply & Quote

Posted at: 5/24/09 06:30 PM

atomoxic LIGHT LEVEL 10

Sign-Up: 02/16/09

Posts: 226

_x and _y set particular coordinates for a MovieClip where as _xscale and _yscale change the % scale of that MovieClip. So something that is 100px wide has a value of _xscale or 100 but if you change this to say 50 the MovieClip will appear as 50px wide instead. Dont forget _x and _y are relative to the MovieClip your particular MovieClip is in.

BBS Signature

None

CompleteDouche

Reply To Post Reply & Quote

Posted at: 5/24/09 06:35 PM

CompleteDouche DARK LEVEL 09

Sign-Up: 12/01/08

Posts: 652

At 5/24/09 06:27 PM, Goonie wrote: This site may explain your problem.

Thanks, just what i needed

My Name is CompleteDuck, and i'm a CompleteDouche
Goldeneye Club

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 10:23 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!