A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Objects affecting other objects

  1. #1
    Join Date
    Apr 2004

    Objects affecting other objects

    I'm using flash MX, and i'm wondering how to make a Circle affect another one when it grows...

    for example...

    Lets say I have 2 circles next to each other... When I rollover a circle... I want it to grow... and when I roll off it... I want it to go back to normal size...

    However, I want the Circle right next to it to move up or down... so when the circle grows... it doesn't cover the other circle...

    I'm all outta idea on how to make this work right... Actionscript confuses me... but whenever I see it explained in a tutorial... I understand it...

    If someone can point me in the direction of a tutorial... or is really good at explaining how to do things... I would appreciate the help


    - Mikey

  2. #2
    Senior Member
    Join Date
    Apr 2001
    ok here goes...

    say the 2 circles (which i asume are movieClips) have their registration points (the cross that means point 0,0) in the center.

    when circle 1 is growing
    its _width is changing

    you could write something like this

    clip2._x = clip1._width/2 + [the distance you want between clip2 registration point and the outer edge of clip 1]

    this would also work for _y

    but they will only work if the two circles are aligned verticaly or horizontlay

    alterantively you could try using hitTest ()
    you can look it up in flash's help file

    hope that helps

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