Advanced Search

Results 1 to 2 of 2

Thread: Move An MC Away From Mouse Movements...

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Move An MC Away From Mouse Movements...

    Hi,

    Just wondering if anyone knows how to make a mc move away from the mouse, once a movie is playing? Basically if the mouse moves to the bottom left hand corner of the screen I want the movie clip which will be sitting on the stage to move to the top right corner... The only thing is I only want the mc to move about 5 pixels, I don't want to fling it to the very edge of the stage... Any ideas anyone?

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Do you want this to be a dynamic process? What I mean by that is do you want the MC to gradually move to the upper left as your mouse moves to the lower right

    OR

    Do you want the MC to move to the upper left only when you are in the lower right?

    I don't suggest going with the first option because moving 5 pixels over the span of a mouse drag across a screen won't really do much.

    For the second situation:
    Make an invisible button in the bottom right and use MCTween (or Tween Class) to move the MC. Something like this:

    Code:
    invisible_button.onRollOver = function() {
       MC.xSlideTo(MC._x - 5, 1, "easeOutQuad")
       MC.ySlideTo(MC._y - 5, 1, "easeOutQuad")
    }

Bookmarks

Posting Permissions

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