Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Rotation With Control Of Mouse...



I would like to seek help in the following file... Where the green arrow would go to the grey arrow with the control of a mouse... The user have to click and hold onto the mouse in order to move the arrow.. However, the user is limited to only the degree from the green arrow to the grey arrow.. Please help if possible...



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-13-2004, 02:07 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Getting An Object To Point Towards Mouse - Rotation - Mouse Follower
Hi guys, I'm kinda getting lost in AS3 and was hoping if someone here can help out.

Picture an arrow in the middle hanging from the top and at the bottom two buttons, Left and Right. When the user enters the frame with mouse, I want the arrow to point towards the mouse maybe with some ease if necessary. Obviously the user will either choose Left or Right so it will look like the arrow is pointing to the button. But I want the arrow object to follow the mouse in realtime and thats why i want to get it to follow the mouse and rotate accordingy, rather than making an animation such as play this when mouse is on button Left (OnRollOver).

So I'm looking for a good script to do that . Any help is appreciated.

Rotation Control
Could a mighty god of the FLASH please point me in the direction of a tutorial on how to controll the rotation of an object with the mouse. I have rendered it in Swift 3d v3 and added a roattion to it, so i have a series of frames with the different views all the way around. Now i have imported that into Flash MX.

I need an action script that will control the rotation of the object. Is this the right way to do it?

im shooting for the type of rotation that when you press and hold the mouse over the object you can move the mouse right and left to controll the rotation.

I only want to admit that I want sugar in my tea.
Mucho Thanxo

Rotation Control
I would like to be able to control the rotation of a MC via a few buttons - setting the MC to rotate to assigned positions. Instead of just having the MC rotate, I want it to spin (and to control the spin speed) and ease to a stop at the assigned/selected position. This MC needs to rotate on its center point.

Any help would be wonderful. I can get objects to rotate no problem, but I have not been able to control the stop points.

Rotation Control
I would like to be able to control the rotation of a MC via a few buttons - setting the MC to rotate to assigned positions. Instead of just having the MC rotate, I want it to spin (and to control the spin speed) and ease to a stop at the assigned/selected position. This MC needs to rotate on its center point.

Any help would be wonderful. I can get objects to rotate no problem, but I have not been able to control the stop points.

Control AXIS Of Rotation?
is there anyway to dynamically select a coordinate to be the axis of rotation for a movieclip?

the reason is: the user will be able to select any number of different elements and adjust them at the same time but whenever I rotate multiple elements at once I need them to be rotated as a single object from 1 center axis not all from their own axis.

I cannot put them all inside a single movieclip and rotate it either because there are several elements the user is going to be able to drag and drop onto the stage and then they will have the ability to select only the ones they want to rotate. and if they were all in the same mc then the non selected elements would be rotated too.

Thanks.

Rotation Control Delay
Edit Problem fixed.

I have a new question though, how would you go about rotating a velocity to match a movieclips rotation. I`m trying :

this.vectorX = Math.cos(this.rotation) * this.speed
this.vectorY = Math.sin(this.rotation) * this.speed;

but this gives horrible reults

Wii - Mouse Control And/or Fake Mouse Control?
I'm building a project where I'm using a Wiimote to control a Flash application. I have all the Wiimote data coming in to Flash, and I would like to use the coordinates to control the mouse. Now, from what I understand, the mouseX and mouseY are read-only properties, so the first question is whether it is even possible to control the mouse through scripting?

If it's not possible, I would hide the mouse and create a "fake mouse" movie clip that I could control the positioning of. However, if I do that, is there any way to tie in the eventListeners for things like onMouseOver, onClick, etc. to this "fake mouse", or do I have to constantly calculate whether the coordinates are on top of a button/interface element?

Movie Clip Mouse Speed Control Depending On Mouse Press
Hi,
Please help me !
As iam developing a small ball game in flash, where i need to control the speed of the ball (i.e, to increase or decrease the speed of ball)when clicked on a button depending on mouse press .

I have done similar on key press but iam not able to do the same for mouse pressed.


Please help me out

Your help will be appreciated.

Thanks & Regards
Zabi

Rotation Around The Mouse
Ok, I have this basic script that let's you draw.
Ideally I would like to know how to rotate an (invisible) object around the mouse, and instead of the drawing being the mouse x and y position I would want it to be the invisible objects. That way it will be drawing swirls around the mouse. Any help would be great.

Even further I would like to have the diameter of the circle get larger as the mouse goes faster, and smaller as it goes slower. But I will cross that bridge when I get there Thanks.

Rotation When Following The Mouse
hi all,

here is the problem:

it must look like in the atached file.

don't know what to do.

thank you.

Rotation By Mouse; Help
I've been making a flash game where you control a spaceship by means of moving the cursor around it. The ship will move towards the cursor, and rotate depending on how many degrees away the cursor is from the ship

an example is in this tutorial:
http://www.actionscript.org/resource.../Page1.htmmoul

The problem I'm having is that I don't want the ship to rotate all 360 degrees, but only in a 120 degree threshold (1/3 of a circle) and I have no idea how to do it...

Rotation After Mouse
Hi

 

I have used the "rotation after mouse" code , but I am having issues trying to work out how to have the "bullet" come from the object and follow that angle in which it is pointing.

 

Any hint/code example would be great.

 

Thanks



Rotation Of Object Following Mouse
I need to rotate one object according to mouse position any guidance?

I am doing atan() function, and get stuck at place where i need to convert e.g
value 1 to 45 degree, i don't know how to do that,

thanks in advance
Arun

Stopping Rotation On Mouse Over
Hello everybody, me again

I have a rotating link menu, the rotation is done by the "SetVariable" and "_rotation" commands, now, its a bit hard for the users to click on the rotating links, so I would like to stop the rotation when the mouse is over the links, and resume the rotation again when the mouse is gone.

Is that possible?

I hope!

Thanks,
Blaster.

Easing Rotation To Mouse
Tricky as hell.

this is what i've go so far.



Quote:




onClipEvent (load) {
ease = 12;
function TurretRotation () {
var MTdistX = _root._xmouse - this._x;
var MTdistY = _root._ymouse - this._y;
var MTdist = Math.sqrt((MTdistX*MTdistX)+(MTdistY*MTdistY));
var TargetTheta = Math.atan(MTdistY/MTdistX);
if (MTdistX > 0) {
RotationEase = ((TargetTheta*(180/Math.PI)-90)-_rotation)/ease;
return RotationEase;
} else {
RotationEase = ((TargetTheta*(180/Math.PI)+90)-_rotation)/ease;
return RotationEase;
}
}
function setxy () {
this._x = _root.tank._x;
this._y = _root.tank._y;
}
}
onClipEvent (enterFrame) {
_rotation += TurretRotation ();
setxy ();
}







this code works GREAT! it eases in nicely like i want it to, and it goes right to the mouse where ever it is on the screen. BUT! since the rotations go (in a circle) 0 to 90 to 180 to 270 to 360/0 when i cross over that 360/0 line at the top, it my turret goes all the way around the opposite direction to get the 1 deggree of where it was, instead of going that 1 deggree....i've tried a couple of tricky things, but if someone could help me, i'd really appreciate it. Mash and mame my code all you want, write your own! i really don't care, just solve my problems for me :-)

-Thanks

Mouse Pointer Rotation?
hey people im developing a penalty shoot out game where you play the keeper anyway i have gloves has the pointer which you move to save the ball and i am wantin to have them rotate slightly when you move either left or right i.e the fingers point up verticly when in the middle of the screen then horizontly left or right when at the laft or right of the screen


I have this code to the move clip that the pointer is in

onClipEvent (enterFrame) {
this._rotation = _root._xmouse/1;
}


whic rotates the movie clip but it is not in the position i explained above it seems to start the rotation from the right of the screen I messed about with xmouse/1 part changing 1 to different values but it just adds more spins when i move accross the screen any ideas?
cheers
Matt

Mouse Over Rotation Stop
hey,

how can i make my pie stop rotating on mouse over?


this is the code in on the movie:


Code:
onClipEvent (enterFrame) {
_root.symbol._rotation += 1;

}
thx

Arrow Rotation That Follows Mouse?
Hello,

I am trying to achieve an effect that I believe is probably fairly easy for the right person. Picture a flash movie with a crosshair pattern on it. In the middle of the cross hair I have a simple arrow which I simply want to rotate (staying centered), to point and follow the movement of the mouse on the screen. So basically all is said and done the arrow would be capble of rotating anywhere inbetween 360 degrees, depending on where the mouse is.

Any help or direction would be most appreciated.
If need be I can point you to a preview of the page I am trying to do this with.

Thanks!

Arrow Rotation Which Follows Mouse?
Hello,

I am trying to achieve an effect that I believe is probably fairly easy for the right person. Picture a flash movie with a crosshair pattern on it. In the middle of the cross hair I have a simple arrow which I simply want to rotate (staying centered), to point and follow the movement of the mouse on the screen. So basically all is said and done the arrow would be capble of rotating anywhere inbetween 360 degrees, depending on where the mouse is.

Any help or direction would be most appreciated.
If need be I can point you to a preview of the page I am trying to do this with.

Thanks!

Mouse And Rotation Detection
i need some help i can't figure out what i'm doing wrong here. i followed this very easy and clear tutorial . i understand the concept but i cant seem to apply it on flash
this is what i come up with

thanks in advance

Object Rotation From Mouse
ok Mr Bill Watson worked this code up for me and it works.. but i have tried tweaking the numbers but i cant get it to work acuratley.  what this does is makes a movie clip of a gun that sits in the bottom right hand corner of a 750X450 movie rotate with the cursor .. so the gun is pointing where the cursor is.

gun.onMouseMove = function(){
    temp1 = _xmouse;
    temp2 = _ymouse;
    wildGuess = 30;
    len = (650-temp1)*(650-temp1)+(311-temp2)*(311-temp2)
    hyp = Math.sqrt(len);
    len2 = (650-temp1)/hyp;
    angle = Math.sin(len2);
    this._rotation = -angle*wildGuess;
}

that works but it dosent follow accuratley

any one have suggestions on tweaking it?

Rotation Based On Mouse Position
I have started producing my second flash game... my first taught me alot but I've seen much better, and now I'm making my second. I have gotten everythign down up until this point. I checked the flashkit tutorials on how to rotate an object to follow the mouse pointer but it doesn't work at ALL, in my game at least. here is the coding for calculating it, and yes al lof the variables ARE correct:


Code:
a = _root.Player._y-_ymouse;
b = _root.Player._x-_xmouse;
angleA = Math.atan2(a, b);
degrees = angleA/(Math.pi/180);
_root.Arm._rotation = degrees;

Since the Arm follows the player's coords exactly, using a = _root.Player._y-ymouse and a = _root.Arm._y-ymouse would be the same.

First of all, when I move the mouse, the arm doesnt get CLOSE to following my mouse. It moves around in a small area, maybe a 50 degree span.

Secondly, when my player moves, the arm aims lower as i move.

If anyone could help me so that the arm aims at the mouse it would be very, very much appreciated. If for some reason you need my whole player/arm script here it is:


Code:
onClipEvent (enterFrame) {
_root.Arm._x = this._x;
_root.Arm._y = this._y;
if (Key.isDown(68)) {
if (this._currentframe == 16) {
gotoAndStop(1);
} else {
this.nextFrame();
}
this._x = this._x + 5;
this._xscale = "100";
} else if (Key.isDown(65)) {
if (this._currentframe == 16) {
gotoAndStop(1);
} else {
this.nextFrame();
}
this._xscale = "-100";
this._x = this._x - 5;
}
a = _root.Player._y-_ymouse;
b = _root.Player._x-_xmouse;
angleA = Math.atan2(a, b);
degrees = angleA/(Math.pi/180);
_root.Arm._rotation = degrees;
}

Link Rotation To Mouse Movement
I have an mc that rotates around a central axis, i want to link the movement of the mouse to the rotation of this mc. basically i want the mc to rotate either clockwise or counter clockwise depending on the movement of the mouse on the stage being either clockwise or counter clockwise in relation to that same axis.

cheers.

Mc Rotation Speed And Mouse Position
I have a spinning movie clip and would like the mc to rotate faster the closer the mouse is to it. Any ideas? I'm sure this is really simple!

Mouse Based Slow Rotation
im trying to get an object to rotate to face the mouse. that part was easy. but what im trying to do now is get the object to rotate 1 degree every frame and take the shortest way to it. the problem i keep having is when teh degrees change from 180 to -180 it messes up. could someone give me a code (that preferably has an if statement that changes the rotation to a positive number before it checks or something)?

Rotation With Actionscript Using Mouse Coordinates
I'm working on a compass as navigation to a site that I'm working on, and the way it is set up is that the needle will rotates with the mouse as you roll onto the stage while a dial outside the compass rotates to the categories. Basically, what I want to happen is this: As you roll off the compass I want the needle to stop following the mouse and snap back up to whatever page you are in. I have included the fla file for anyone to take a gander at and hopefully give me a little help. Thanks in advance.

[F8] Grrr....easy Mouse Rotation Please?
i gotta get a couple of books lol...
i know this is something simple, but i don't know how to do it lol...
i looked at tutorials and they are all a lot longer and more complicated than i think it could be. how should i make a mc rotate with the mouse?

Easing Rotation With Mouse Angle
I am trying to get a movieclip to rotate according to the mouse angle, but it seems there is always one axis line that when you cross it, the moveclip has to do a complete 360 to get to the right angle. I'm trying to avoid this and have the clip rotate and ease into place smoothly when crossing any axis.

Here's my function to get the angle and move the movieclip:


Code:
this.onMouseMove = function() {
x = this._xmouse;
y = this._ymouse*-1;
angle = Math.atan(y/x)/(Math.PI/180);
if (x<0) {
angle += 180;
}
if (x>=0 && y<0) {
angle += 360;
}
if (this._ymouse>0) {
angle = angle-360;
}
updateAfterEvent();
//
rotate(myClip, angle);
}
Here's the rotate() function:


Code:
function rotate(targ, r) {
targ.onEnterFrame = function() {
targ._rotation += (r-targ._rotation)/5;
};
}
Thanks!

Link Rotation To Mouse Movement
I have an mc that rotates around a central axis, i want to link the movement of the mouse to the rotation of this mc. basically i want the mc to rotate either clockwise or counter clockwise depending on the movement of the mouse on the stage being either clockwise or counter clockwise in relation to that same axis.

cheers.

Object Rotation With Mouse Movement
hi all, can anyone help me to obtain an effect similar to this one? (visit the following link)

http://www.sony-latin.com/handycam/.../3d_dvd101.html

i already know that the rotation moving over the squares on the bottom is made with a "on rollover...gotoandstop" action..isn't it?... but i don't know how to control the rotation using the mouse.
try to click and drag the camera image in the example...
i don't mind about zoom and y-axis rotation, i'd just need x-axis rotation...any suggestion?

thanks...bye

Rotation Based On Mouse Location
Can anyone tell me how to use trig to rotate a movie clip based on (my_mc._x, my_mc._y) and (_root._xmouse, _root._ymouse)?

Mouse Follow Rotation Limits
I'm currently working on a game where I have a movieclip that rotates based on _xmouse.
__________________________________________________ _________________________

Code:
this.onEnterFrame = function() {
//Mouse
__________________________________;
Mouse.hide();
__________________________________;
this.shooter._rotation = 0;
this._xmouse = 100
if (this.shooter._rotation>-90 & this.shooter._rotation<90) {
this.shooter._rotation += _root._xmouse/2;
} else if (this.shooter._rotation<-90 & this.shooter._rotation>90) {
this.shooter._rotation = _root._xmouse/2;
}
};
__________________________________________________ _________________________

mouse this allows the rotation to follow the mouse, but I can't figure out how to set limitations for it. The min value should be -90 and the max should be 90.

Thanks for those who help me.

Mouse Follow Rotation With Ease
I'm using the basic mouse follow technique i stole from some tutorial, yes i understand it, but im in a rush

I'm trying to make it ease to the spot but it doens't seem like there is a way.

It is jumpy, i would like to it to slowly smooth to the current mouse location. It's going to be used for a touch screen


Heres my current AS:

ActionScript Code:
stop()face.onRollOver = function(){startDrag("mouseTarget", true);onMouseMove = function(){mouse_x = mouseTarget._x;mouse_y = mouseTarget._y;xDistance = mouseTarget._x - face._x;yDistance = mouseTarget._y - face._y;// set the normalisation factorif (Number(xDistance)<0) {    normalise = -1 * xDistance;} else {    normalise = xDistance;}if (Number(yDistance)<0) {    normalise = Number(normalise)+Number((-1 * yDistance));} else {    normalise = Number(normalise)+Number(yDistance);}// determine the directionif ((Number(xDistance)>=0) and (Number(yDistance)>=0)) {    direction = 90*(yDistance/normalise);} else if ((Number(xDistance)<=0) and (Number(yDistance)>=0)) {    direction = Number(-1*90*(xDistance/normalise))+90;} else if ((Number(xDistance)<=0) and (Number(yDistance)<=0)) {    direction = Number(-1*90*(yDistance/normalise))+180;} else {    direction = Number(90*(xDistance/normalise))+270;}// set direction of needle and bulletneedle._rotation = direction;}}face.onRollOut = function(){    mouseTarget.stopDrag();}


Heres a link to the current SWF:
http://www.joshuajonah.com/compass.swf


Heres a link to the current SFLA:
http://www.joshuajonah.com/compass.fla

Mouse Related Rotation Of A Symbol
how can you tell where the mouse is on the screen

i no it has some thing to do with the _xpos and _ypos

i want to put these in to a variabe and then rotate a symbol buy the relotive mouse points

the symbol is called symbol 1

the code is to be put on the symbol

any help much apresiated

MC Rotation Based On Mouse Position?
I have a character that I would like to rotate 360 degrees based on the position of the mouse cursor so that the character, a movieclip, will be facing the cursor at all times. The movement needs to be in realtime and as smooth as possible. The character is for use in a game. I have been having a lot of trouble with this one. What would the best way to code this?

Change Globe Rotation With Mouse Direction
hi list
i have to create a rotating globe animation in flash with following features:
1.the globe should stop if mouse rolls over it.
2.it starts rotating to a particular side if cursor moves to the right/left edge.
3.on a particular point on the globe user should click the mouse to get the details of the companie's portfolio in that region.
4. the whole interactive animation would then b converted as a screensaver.
5. the cursor changes at a particular point or edge. i know how to do this in director but in flash.....m not sure i can do this without any plugin.....is there something in v5.0 to achieve this.
what bugs me most is the second and fifth point mentioned above. has anyone done anything similar or have any ideas about any of the 4 points kindly help. its sort of urgent......the project hasn't taken off yet but i know once its started i'll b a start to finish job......so plz give ur suggestions ASAP.
regards

Setting Rotation Of Object Relevant To The Mouse
im trying to make the mc rotate corresponding with the _xmouse but its not Working i dunno why
i attached the file let me know if you anyone knows how to set it thanks

Rotation On Movie Clip, Follow Mouse
I am creating a game where I have a turret (a movie clip) on a helicopter (also a movie clip) , and the helicopter has action scripting to move with the W, A, S, and D keys, and the custom cursor is crosshairs. I want the turret to follow the mouse with rotation only, and follow the mouse whether the mouse is moved and the helicopter isn't, or whether the helicpter is moved and the mouse isn't, or if both are. I am using MX and I would appreciate any help. I have searched the tutorials. Thanks for your time.

Trigonometry Mouse Rotation And Movement Of A Character
Hi Everyone,

I was wondering if anyone knew a script for making a MC rotate by moving the mouse, and then making him move what ever way he is facing by pressing the "up" arrow.

Any answers would be appreciated

Thanks,

Mr_Welfare
_______________________
Flash MX 2004 Professional

Mouse Tracking And Rotation Ponts For A Beginner
Hi there, first post on these forums.

Am trying to work out how to create a piece of actionscript for a website I am working on. A quick overview:

Navigation bar will be a man holding a lantern, the arm will be made of two separate elements, with the hand at the end holding the lantern. The idea is that the arm will track the mouse movement to light up the navigation bar.

It has been suggested to me to set rotation points that will limit the amount of rotation an element will go through to get a semi realistic arm movement.

...Unfortunately I am a COMPLETE beginner with actionscript and don't even know where to start, so input/advice/links to tutorials would be frightfully helpful!

Thanks a lot in advance,

-Matt

Rotating Menu- Slow Rotation When Mouse Over
i am trying to slow a rotating menu when the mouse is over the button like www.square-enix-usa.com press on the character button and the menu will come up. It is dame fine bit of work! An help would be great!

Rotation Tween Stutters When Mouse Moves?
Hey whaddup?

I wanna make a rotating record (1 rotation), but when I use a simple tween it doesnt rotate smooth , it only does if I hold mouse still. Check it out here (press button in the middle of the record to make it spin)

http://homepages.svc.fcj.hvu.nl/1127456/plaat.swf

http://homepages.svc.fcj.hvu.nl/1127456/plaat.fla

how can this be fixed? Preload or something?



-one-

Movie Clip Rotation To Follow Mouse
Hey,

First off, lemme start by saying that this site is incredibly awesome. Every time I have a problem or wish to learn something in Flash I turn to kirupa.com. Thanks a lot!

Now for my problem. Have you ever played Madness? You know how, depending on where the mouse is, the hand rotates i.e. points at the mouse's current position? Well, I want to learn how to do that. I've attached a short animation demonstrating what I want to be able to do (the arrow points at the mouse's position, and then gun represents the movie clip that rotates) using a script provided by the kind soul who will be willing to help me.

Thanks again,
-Raven~Storm

Help Needed-- Script For Slowing Down And Stopping Rotation When Mouse Leaves .swf
I have a rotating movie clip that slows down and stops as the cursor moves to the center of the stage. When you move the cursor to the left or right it speeds up.

Problem: The movie clip doesn't stop rotating if you move the cursor to either side and then off of the .swf. I need the rotation to slow down and eventually stop if this happens. I've tried a couple things to no avail. Any suggestions?


The .swf can be viewed here: http://www.notveryinteresting.com/rotation.html

Here is the action script:

onClipEvent(load){
reducer=24;
brake=0.2;
frameRate=18;
}

onClipEvent(enterFrame){
mousePos={X:_root._xmouse};
if((0<_root._ymouse)and(_root._ymouse<380)){
rotation=(mousePos.X-275)/reducer;
this._rotation+=rotation;
}

else{
if(rotation>0){
rotation=rotation-brake;
this._rotation+=rotation;
}
if(rotation<0){
rotation=rotation+brake;
this._rotation+=rotation;
}

}
}

Help Needed With Some Flash8 AS - Rotation Of Movieclip In Relation To Mouse On Stage
Ok, I'll try to keep this fairly simple...

a) I want to create something similar to the menu that is dominant on this website :
http://www.satyricon.no/

though it used to be a bit cooler, with that it used to rotate backwards/depending on where the mouse was in relation to it... I'd like to figure out how its done/be able to implement a similar kind of thing in a flash folio I am slowly making/figuring out ideas for....

Ive been tinkering with other ideas, which are here:
http://members.westnet.com.au/alex66/

Very taken with the idea of creating kind of "orbiting" elements/having interaction in that sense and creating a feeling of "Depth" as well through the use of scale..

Anyhow - the "main" topic of my request here is - to get some help with the Actionscript that I have currently got, which is a horrible mish-mash of code off some of the Kirupa tutes... I am still learning Flash, and Im sure there is still a long long way to go

It's very close to doing what I want it to do, but, Im not sure/have no idea what the missing "element" is that is eluding me
If possible I'd like to be able to "limit" the "speed" of the rotation when the user gets too "close" to the menu, so it doesnt go into hyper speed and become unuseable, and also, not have it ever really truly stop - I guess maybe some easing or something ?

Anyhow, the url for the files is:
http://members.westnet.com.au/alex66/rotation.html [to view/preview it]
http://members.westnet.com.au/alex66/rotation.fla [the Flash 8 .fla]

Ive "commented" the .fla so it should be fairly easy to understand

All and any help really appreciated! I know this is kind of a "really simple" thing, but I've spent hours searching around google and such and trying different things and havent been able to sus it out yet

Regards from "down under" !
A.

Mouse Control, Out Of Control
I'm working on a Splash screen for a web site.located here I found a bit flash 5 code that is running the "moving images". The problem is that when the mouse is moved left or right from the center too much, the speed of the images goes way to fast.
I am using MX 04 to build this, but I have always used tweens, so I'm a total noob to AS.
What I need is way to limit the speed of the movie clip as the mouse moves away from center. Or limit the area that the mouse can use to effect the movie clip.
Here is the code:
Code:
onClipEvent (load) {
center = 800/2;

}
onClipEvent (enterFrame) {
_parent.dx = center-_root._xmouse;
_x += _parent.dx*.1;
if (_x<-_width/2) {
_x = 0;
}
if (_x>0) {
_x = -_width/2;
}

}
Any help with this would be greatly appreciated,

Mouse Control HELP
I have a progrma that shows a cube. I can then make the cube get bigger and smaller just by dragging the sides. I wanted to add a formula that will give me the volume. I don't know if this can be done. If it can, can anyone help me?

Maybe to make it simpler can it be done with a redctangle and just figure out the area. I really need help so if anyone could help me out I would really appreciate it.

If you would like to see what I have done so far I will gladly send it to you.

I Need Mouse Control 2
I have an image (3000px wide) which goes left to right with the help of some code on frame 1 (image variable=content);

xcenter = 325;
xdiff = _root._xmouse-xcenter;
_root.content._x = _root.content._x-xdiff/8;

with goto frame1 loop on it.

How can I stop the image going off the edge of the scene???

Merry Xmas and have a fab NY...........

AS Mouse Control
Is there a way to issue a mouseup command with AS?

thanks,
YJ

Copyright © 2005-08 www.BigResource.com, All rights reserved