A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: how to make a mc follow cursor on _y axis

  1. #1
    Junior Member
    Join Date
    Nov 2001
    Posts
    2
    I was wondering how I would get a mc to follow the cursor along the _y axis. I want to have a mc trail the cursor as it goes across the menu.

    This is probally pretty basic but I am just starting to step out of basic flash and consentrating on learning more advanced script and such. My first flash site is http://www.thegermanfolks.com.
    Not really much flash just a basic menu done in flash. I like flash for its efficiency in optimization and not so much for fancy animations although I do intend to become more advanced in flash. I am already working on v.3 for the German Folks and it is going to be pretty advanced. That is part of the reason for getting on this forum and asking questions.

    One day I hope to answer some questions for someday.

    Sorry I am rambling this is my first post here and I have a lot of respect for designers and programmers. I currently only have a degree in visual communications and also working on a CIW degree.

    thanks,
    Dusty
    [Edited by GambleForFood on 11-15-2001 at 04:40 AM]

  2. #2
    Senior Member
    Join Date
    May 2000
    Location
    Roermond, The Netherlands
    Posts
    198

    In fact it's quite simple

    Hi,

    In fact it's quite simle....
    Use this: (block is the instance name of your movieclip)

    setProperty ("block", _y, getProperty ( _root,_ymouse ));

    If you want it for both the axis, use this:

    setProperty ("block", _x, getProperty ( _root,_xmouse ));
    setProperty ("block", _y, getProperty ( _root,_ymouse ));

    Good luck!



  3. #3
    Junior Member
    Join Date
    Nov 2001
    Posts
    2
    Thanks for the info I will give it a try right now. Here is a quick example I made of what I am trying to achieve just so you can get a better idea of what I am doing:



    Does this still apply to the script that you showed me?

    thanks again,
    Dusty

  4. #4
    Senior Member
    Join Date
    May 2000
    Location
    Roermond, The Netherlands
    Posts
    198

    Try this

    I think you will do fine with the script I first posted..

    And you are lucky! Because right now I'm busy with a script that follows the mouse with a little delay... Which is much cooler....

    Download it here:

    http://barry.e-factory.nl/mousefollow.fla

    and the swf:

    http://barry.e-factory.nl/mousefollow.swf


    Good luck!!

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Location
    Copenhagen
    Posts
    192
    Hello

    If you want the "mousefollow" to work on a long timeline, what do you do then? The fla-file posted in the thread before, only seems to work within two frames. You have a GotoAndPlay (2) in the third frame.

    Regards

    Michael

  6. #6
    Senior Member
    Join Date
    May 2000
    Location
    Roermond, The Netherlands
    Posts
    198

    Try this

    Just put the 3 frames in a new MC.... And place the new MC in your movie...

    Like this:

    http://barry.e-factory.nl/mousefollow2.fla


  7. #7
    Senior Member
    Join Date
    Jan 2001
    Location
    Copenhagen
    Posts
    192
    Hello Matrix

    Thank you for answering my question. I dunno what I did wrong. I tried to put it in a movieclip, just as you did, but it didn't work for me!?
    Anyway, thanks alot.

    Michael

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