A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Help with x position function please

  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    15

    Help with x position function please

    Help. I need a function to describe the position of an object relative to it's size and another object.

    The problem:
    There are two objects. (say, circles of equal size)
    At size 100% they have the same x position. (for simplicity say, x = 0)
    As the objects increase in size (at an equal rate) the x position of Object 2 changes.
    At size 200% the x position of Object 2 would be +20 (the x position of Object 1 + 20)
    At size 50% the x position of Object 2 would be -5.

    I need a function that would describe the position of Object 2 as the objects increase or decrease in size (from 10% to 500%).

    Can someone help or point me in the right direction for a solution?

  2. #2
    Iron Chef In-Training OpethRockr55's Avatar
    Join Date
    Sep 2005
    Location
    Kitchen Stadium
    Posts
    313
    Are you looking for something that is a relationship? Like for every 10% off you are from 100% you modify by that amount? (Example: %10, or 90% off would equal a - 9 change in the x position)

  3. #3
    Junior Member
    Join Date
    Nov 2000
    Posts
    15
    That's a nice direct way to think of it. The relationship may not be that constant (my example was misleading) but I'll try it and see how it works visually. Thanks for your help OpethRockr55.

  4. #4
    Junior Member
    Join Date
    Sep 2005
    Posts
    6
    if u want an linear relationship, this can be easely done. But if u want another variations modell, than can be more complicated. Be more exactly.
    Problem is ti establish an mathematical equation for that. This can be done if u know what u want (what kind of variation).

  5. #5
    Bacon-wrapped closures Nialsh's Avatar
    Join Date
    Dec 2003
    Location
    Houston!
    Posts
    338
    submit some example pictures

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