A Flash Developer Resource Site

# Thread: How to get x and y co-ordinates after scalling a movie clip+ Problem

1. ## How to get x and y co-ordinates after scalling a movie clip+ Problem

Hello,
I am working on a flash game in which i want to focus the light on some objects. For that I increased the xscale and yscale of the rope. When i rotate the rope I want to increase the xscale and yscale up to the stage.(according to x position ). I tried graphics equation to get the x' and y' after scaling. But it gives wrong values for co-ordinates.

I used the following equations to find new positions of x and y (x' and y') after scaling.
x' = ( x * sx) + (xf *(1-sx));
y' = ( y * sy )+ (yf *(1-sy));

so if anybody have any idea about how to solve this problem then pls reply soon.

2. Perhaps I misunderstand this...but you're scaling an object, and after you scale it, it gives incorrect X,Y coordinates? I'm going to guess that what's happening is that they don't actually change...correct? If so, then perhaps you don't realize that the XY coordinates are always read from 0,0 of the movieClip? If you want to read the XY of the top left corner, even when the topleft of the graphic is not at 0,0 in the movieClip, then either A) it needs to be centered so that you can just take XY and divide it by 1/2 and subtract from the XY, or make the graphic inside the MC ANOTHER MC that you can read the XY of relative to the 0,0 of the main MC, and then subtract from the parent XY.

Hello ,
I have attached a word file which describes my problem in detail. I hope this will help u to understand my problem. any help will be appreciated.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap