Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > Simple Stuff (Newbies)

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-25-2001, 07:06 PM   #1
chiefmonkey
Registered User
 
Join Date: Jan 2001
Location: Scotland
Posts: 52
Question

I know it is easy enough to have an object follow the x position of the mouse but how do yo uget the movie clip to move in the oppisite direction from the mouse.

TIA

George
chiefmonkey is offline   Reply With Quote
Old 01-25-2001, 11:33 PM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

I made an example like this for the mouse trailer tutorial but never posted it:

My clip is 300px by 300px

// run away!
setProperty ("_level0.target", _x, 300 - _root._xmouse);
setProperty ("_level0.target", _y, 300 - _root._ymouse);

Loop that and the clip will do the exact opposite to the mouse. Change the 300 values to suite the dimensions of your clip.

Cheers

Jesse
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder
Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make an object follow the mouse shadwickman ActionScript 2.0 0 06-14-2006 12:42 AM
Line 'end points' follow mouse dark_templar_99 ActionScript 1.0 (and below) 3 05-27-2006 06:43 PM
TRIG - MC follow Mouse rotate around mouse point popweasel ActionScript 2.0 6 04-13-2006 12:51 AM
Enlarge and follow mouse FTStudiosJoe ActionScript 2.0 1 11-22-2005 02:25 AM
multiple MC mouse follow scripts... Vignor2003 ActionScript 2.0 1 04-20-2004 10:27 PM


All times are GMT. The time now is 04:45 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.