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




_xmouse



Hi friends
Who knows the mathematical formula 4 converting _xmouse in a movie clip to _root._xmouse (and _ymouse too)



Mymovie._xmouse = [ ] _root.xmouse ?



thanx



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-09-2004, 11:23 AM


View Complete Forum Thread with Replies

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

Mc._x = _xmouse
I've made a movie that uses the symbol._x=_xmouse script and it works fine. But I can't do the same thing in a movie clip and get it to work in the main movie once I've dragged the movie clip onto the stage from the library. Is this meant to be the case or I am missing something blindingly obvious?

I tried symbol._x = _root._xmouse; it still doesn't work, any more ideas?

Could it be something to do with not using "instance name" in the place of "symbol" as there is no instance name until I have finished the movie clip, dragged it onto the stage and then named the instance?

I have managed to see the movie clip stuck in the top left of the screen rather than where I placed it. How can I change the starting co-ordanates for the movie clip?

_xmouse
i have a movie clip that follows the mouse position on the x axis my problem is i would like to limit the area within which the clip follows the mouse. I can get the clip to stop in one direction (left or right)but not both am i on the right track?

script

onClipEvent (enterFrame) {
xpos = (_root._xmouse);
pos = (xpos>=400 || xpos<=50);
if (pos=false) {
this._x = xpos;
}
trace(pos);
trace(xpos);
}

_xmouse
will
code:
_xmouse=52

move the mouse pointer


If not what will (if anything)

_xmouse Value
Hi,
How can I have value of _xmouse as between 150 and 350. I want the event to take place only if the _xmouse value is between 150 and 360.


ActionScript Code:
onClipEvent (mouseMove) {
    if (_root._xmouse>150) {
        targety = _root._ymouse;
        if (_y>250) {
            _y = 250;
        }
        if (_y<50) {
            _y = 50;
        }
    }
Thanks
ketan

[AS] _xmouse - ._x?
let's use the horizontal menu from the .fla source files as an example:

lets say that this file, "horz_menu.swf", is used as a news picker (much like xm2.com's). on(Load) of the _root movie, it loads "horz_menu.swf" into my container movie with the instance name "container."

Now my question is, how can I get the menu to not move at all unless the mouse is over the container movie? I know it has something to do with AS, but i'm stumped. if anyone can understand what i'm saying, i'd really appreciated some help

thanks.

_xmouse Help...
hey guys,
check this out. I have a custom cursor of a car that I am using and want it to point to the left when you move the mouse to the left and point to the right when you move the mouse to the right. currently i can make it change directions based on passing a certian point, but can't figure out how to check if your moving the mouse to the left or right.

this is what I have going so far...


Code:
Mouse.hide();

this.onMouseMove = function() {
car._x = _xmouse;
car._y = _ymouse;
//just an input box with mouse pos
xPos = Math.floor(_xmouse);
if (_xmouse <= 200){
// car pointing to the right
car.gotoAndStop(1);
} else {
//car pointing to the left
car.gotoAndStop(2);
}
updateAfterEvent();
};
this only changes the direction if it is less than 200, but i want to constantly check if the user is moving the cursor to the left or right, is this possible?

-brad

_xmouse Tutorials?
Anyone know where to find some tutorials on mouse position?

Symbol._x = _xmouse
I've made a movie that uses the symbol._x=_xmouse script and it works just fine. But I can't do the same thing in a movie clip and get it to work in the main movie once I've dragged the movie clip onto the stage from the library. Is this meant to be the case or I am missing something blindingly obvious?

Thanks in advance!

HitTest(_xmouse)
is this possible? I've been trying to put that kind of action right onto a movie clip, but it never works. Please help me.

Easy _xmouse
this should be simple.

If the xmouse is <128 then tell a a movie gotoand play 2

if (_xmouse<=128) {
_root.menuproduct.gotoAndPlay(2)
}

what am i missing..been awhile using flash

_xmouse & _ymouse
Hello there.. quick question.

Is it possible to plot a square area using x & y co-ordinates which then can be checked to see if the _ymouse || _xmouse have entered into this square ?

Any help would be great.

_x = _xmouse Problems
I have an explosion movieclip created so that when i click, the clip moves to the location of the mouse, then plays its animation. The actionscript for that action is this:

onClipEvent(mouseDown){
_x = _xmouse;
_y = _ymouse;
this.play();
}

But when I test the movie, it looks like it just explodes in random places when i click!
Has anyone else had this problem? How is it solved?

_root._xmouse. HELP
_root._xmouse = _root.crosshair.xpos;
_root._ymouse = _root.crosshair.ypos;

That is the code I've got in a movieclip two frames long nested in the _root level. The code is on the second frame of a two-frame clip with the instance name of "posfinder"

Then I've also got nested in the _root level, a movielcip called "crosshair" which has two dynamic text boxes, of which who's instance and variable names are set to "xpos" and "ypos" respecivly.

Yet when I test the result, I just get this message displayed in both text boxes:

level0.crosshair.xpos (ypos for the other one)

What am I doing wrong?
Thanks

_xmouse Issues
Hello all. My problem lies in the fact i'm trying to move the frames of a movieclip either forward or backwards when the mouse moves along the x-axis. I know to use the _xmouse, but the only way I can figure out to make it work is to compare the last _xmouse position to the current _xmouse position.

if _xmouse> last_xmouse
goto next frame

How would I keep the last _xmouse position while getting the current _xmouse position? Thanks.

-A

Last _xmouse Position
I've this problem. I've this movieclip. When the movieclip loads it jumps to and stops at frame 25 (from 50). Now what I want to do is;

if the user moves to mouse to the left the movieclips goes to the previous frame and if the user moves the mouse to the right it shows the next frame.

The problem is that I need to have a variable that holds the the last _xmouse position (and not the current _xmouse). How do I achieve this?

I got so far:


Code:
onClipEvent (load) {
_root.movieClip.gotoAndStop (25);
}

onClipEvent (enterframe) {
if (_xmouse <= lastX) {
_root.movieClip.nextFrame();
}

else if (_xmouse >= lastX) {
_root.movieClip.prevFrame();
}
}
How do I get the data for in lastX?

Thanx

_xmouse _ymouse....
I've got a scrollbar type thing scripted to move text up and down when the user's mouse is over up and down arrows... it's also scripted to move the text faster the further away the mouse is from the center of the arrows... my problem though is that I haven't been able to figure out how to stop the text from moving when the user rolls out of the active area... here's what I have so far...

text_mc._y = 720
vert = Stage.height/2 -38;
_root.onEnterFrame = function() {
if((_ymouse >= 195 && _ymouse <= 328) && (_xmouse >= 488 && _xmouse <= 526))
reelSpeed = (_ymouse - vert)/10;
text_mc._y += reelSpeed;
if(text_mc._y >= 720) {
text_mc._y = 720}
if(text_mc._y <=150) {
text_mc._y = 150;}
}

any help is much appreciated...

John Fulton

Detect _xmouse
i have object that folow mouse pointer and i'm trying to make at some x value play other movie

if (buttonsSlider._xmouse < 85) {
radio_under_menues._y = 64;
} else if (buttonsSlider._xmouse > 120) {
radio_under_menues._y = -64;
}

sould i put some array or what?

_xmouse And _ymouse
peepz i have this script (it's placed on the 19th keyframe in a movieclip (name = mcSubMenu)):


Code:
stop();
this.onEnterFrame=function(){
if(_root.menuclick==1){
gotoAndPlay(21);

delete this.onEnterFrame
}





if(this._parent._parent._parent.mcBottomNavigation._y <= 450){

if ((_xmouse <= 0 or _xmouse >= 492) or (_ymouse <= -29 or _ymouse >= 398)){
gotoAndPlay(21);
this._parent.mcWomenTextBaseOver.gotoAndPlay(2);
delete this.onEnterFrame;

}
}


if(this._parent._parent._parent.mcBottomNavigation._y > 450){
if ((_xmouse <= 0 or _xmouse >= 492) or (_ymouse <= -29 or _ymouse >= 537)){
gotoAndPlay(21);
this._parent.mcWomenTextBaseOver.gotoAndPlay(2);
delete this.onEnterFrame;



}
}
}
my problem is that if my mouse is between the _xmouse and _ymouse i specified above, and i click on a button in the _parent of this movieclip and i give the button the following code:

on(press){
this._parent.mcSubMenu.gotoAndPlay(21);
}

it will do the right thing, but if i rollout my mouse of the _xmouse and _y mouse position it will motion agian :S

im getting crazy :S

Help With _xmouse & _ymouse
Hey guys...
I just happen to stumble along this little tutorial.
http://www.bewired.nl/actionscript.p...20voor%20Flash
It's in German I believe, and I can't understand it. But from looking at the actionscript it seems like theres a better way to accomplish what their doing. Then again i'm not exactly sure what their doing...
Does anyone have any other ideas for it?
Thanks

_xmouse Problem
Ok folks created this little gallery with a sliding movie
Works fine on it's own. The problem arises when it is
loaded into a another movie. The mouse seems to react to the flash player not the movie it that it is coded in.

Stand alone version:
http://www.dezineasite.co.uk/test/scrolling1.html

Code for stand alone version:
_root.onEnterFrame = function () {
this.buttons_mc._x = (-587/360 * _root._xmouse) +13;
}


Loaded version:
http://www.dezineasite.co.uk/test/test1.html

Code for loaded version:
this.onEnterFrame = function () {
this.buttons_mc._x = (-587/360 * this._xmouse) +13;
}


The above code is in the loaded movie called scrolling1.swf.
Now to my knowledge this refers to the current time line where the code lives on frame 1. So can you explain to me why the scrolling buttons movie, that is in scrolling1.swf goes right across the screen until the mouse reaches the edge of the player (not the movie it's loaded into. If I stretch the player on my computer the button_mc continues past the all movies until it reaches the edge of the player.)

Files:
http://www.dezineasite.co.uk/test/standard1.zip

[CS3] [AS2] Help With _ymouse & _xmouse
Hello,

I'm working on this banner - http://koncept2k.com/hostAnalytics/

The Alt text pop up when user rollover certain individuals. However, on the last 2 guys Gary & Sreedhar on the banner. These text boxs pop-up for them is shifting to the right. I would need them to display in full instead of cut-off.

This is the script I use for each individual as follow, in this case Gary.

garyHit_mc.onRollOver = function() {
this.onEnterFrame = function() {
garyTxt_mc._alpha += (100-garyTxt_mc._alpha)/3;
garyTxt_mc._x -= (garyTxt_mc._x-_xmouse)/2;
garyTxt_mc._y -= (garyTxt_mc._y-_ymouse)/2;

This is an example of the site that has the correct interaction -
http://www.successfactors.com/company/management/

Thanks a lot for helping me out.

_xmouse AND Firefox
OH NO !! _xmouse does not work in FIREFOX !!
how can i detect the mouse's X now from the root !???

HELP !!

_X = _XMOUSE Boundries
I have a bar that acts as my navigation and i have a slider nob that follow the mouse on its x axis.

The problem is that I want the slider nob to stop following the mouse X when it gets to the end of the navgation right and left length.

Here Is The Coding Im Using
navSlider.onMouseMove = function(){
navSlider._x = _xmouse;
}

navSlider1.onMouseMove = function(){
navSlider1._x = _xmouse;
}


Any1 have any ideas how I could achieve this?? The lenght of navigation bar is 613.

Thnx

Set _xmouse; _ymouse
Hi are u alll happy Flash users!

I'm tring to reset the coordinates of my mouse pointer to some defaoult coordinates, regardless to it's previous position.

something like this:

ActionScript Code:
onClipEvent(enterFrame)
{
    _xmouse=-32;
    _ymouse=32;
}

this dosen't work.

Any hints, help, AS stuff?

Thanks!

Paris

NextFrame On _xmouse
Dear ACTIONSCRIPT commmunity,
I would appreciate some help from you.
I made a 3D object in Swift and i imported it in my flash movie. I made it rotate. Now i want it to start rotating to left or right(prevFrame or nextFrame) by moving the mouse to -x or +x.
I would appreciate your help a lot.

Sincerely,
Ventix

_xmouse And _ymouse
peepz i have this script (it's placed on the 19th keyframe in a movieclip (name = mcSubMenu)):


Code:
stop();
this.onEnterFrame=function(){
if(_root.menuclick==1){
gotoAndPlay(21);

delete this.onEnterFrame
}





if(this._parent._parent._parent.mcBottomNavigation._y <= 450){

if ((_xmouse <= 0 or _xmouse >= 492) or (_ymouse <= -29 or _ymouse >= 398)){
gotoAndPlay(21);
this._parent.mcWomenTextBaseOver.gotoAndPlay(2);
delete this.onEnterFrame;

}
}


if(this._parent._parent._parent.mcBottomNavigation._y > 450){
if ((_xmouse <= 0 or _xmouse >= 492) or (_ymouse <= -29 or _ymouse >= 537)){
gotoAndPlay(21);
this._parent.mcWomenTextBaseOver.gotoAndPlay(2);
delete this.onEnterFrame;



}
}
}
my problem is that if my mouse is between the _xmouse and _ymouse i specified above, and i click on a button in the _parent of this movieclip and i give the button the following code:

on(press){
this._parent.mcSubMenu.gotoAndPlay(21);
}

it will do the right thing, but if i rollout my mouse of the _xmouse and _y mouse position it will motion agian :S

im getting crazy :S

_xmouse Scroll Bar
Hi

Im developing a scroll bar that works when you move your mouse to either edge of the flash movie.

At the moment I have a controller movie (within my main movie) that has the actions:


Code:
if (_root._xmouse>=650) {
_level0.imagebar.nextFrame();
} else {
_level0.imagebar.stop();
}
and in Frame 2


Code:
if (_root._xmouse>=50) {
_level0.imagebar.stop();
} else {
_level0.imagebar.prevFrame();
}
gotoAndPlay (1);
It works great except for a few problems. Firstly If you take your mouse off the swf file (within a html document) it will keep scrolling. And secondly *sometimes* it seems to scroll by itself upon the page loading.

I'm wondering if it is possible to apply the .prevFrame() and .nextFrame() to a button object using (rollOver) not (press).

How do I change my code so it will work with a button?

(Yes I am an actionscript newb)

Thanks

_xmouse And _ymouse
Is there a way to seee if the mouse is focused in the flash player? I am using _xmouse and _ymouse and as soon as the mouse is out of the player it seems to just keep that last position the mouse was in inside the player.

_xmouse And _ymouse
Well I'm making a "CSI" game and for parts where you use the swabber I wanted it to replace the mouse with the swab icon (or fingerprint duster, etc.) So I wrote this code:

quote:
onClipEvent(load)
{
_root.swaben=0
x1 = _x
y1 = _y
}
on (press)
{
_root.swaben = 12
_root.dusten = 0;
_root.lighten = 0;
}
onClipEvent(mouseMove)
{
if (_root.swaben == 12)
{

Mouse.hide;
this._x = _xmouse;
this._y = _ymouse;
}
else
{
this._x = x1
_y = y1
}
}

So it sets its original coordinates to x1 and y1, when you click on it it sets swaben to 12 (don't ask me why) and sets lighten and dusten to 0 in case you had them selected, and SUPPOSEDLY hides the mouse and sets the coordinates. Not so.

http://ledi51.t35.com/cistest.swf
Here is the swf file. the mouse doesn't disappear and for some reason the icons go randomly around the screen. Any ideas?





























Edited: 08/28/2008 at 08:24:18 AM by ledi51ofc

[CS3] [AS2] Help With _ymouse & _xmouse
Hello,

I'm working on this banner - http://koncept2k.com/hostAnalytics/

The Alt text pop up when user rollover certain individuals. However, on the last 2 guys Gary & Sreedhar on the banner. These text boxs pop-up for them is shifting to the right. I would need them to display in full instead of cut-off.

This is the script I use for each individual as follow, in this case Gary.

garyHit_mc.onRollOver = function() {
this.onEnterFrame = function() {
garyTxt_mc._alpha += (100-garyTxt_mc._alpha)/3;
garyTxt_mc._x -= (garyTxt_mc._x-_xmouse)/2;
garyTxt_mc._y -= (garyTxt_mc._y-_ymouse)/2;

This is an example of the site that has the correct interaction -
http://www.successfactors.com/company/management/

Thanks a lot for helping me out.TextText

Slide With _xmouse
i wanna the slide like:www.luacrescente.com.br
---------------------------------------------
sees my attached trying file.


NEEED THIS HELP GUYS!

[AS2] _xmouse & _ymouse
I have an AS2 class I'm calling hittest() from and passing in _xmouse & _ymouse in from. What does _xmouse & _ymouse refer to exactly? (The class doesn't extend MovieClip or anyting).

I want to make sure it refers to the stage and not any other movieclip...I thought I've read how _xmouse and _ymouse has changed since Flash player 6...I'm concerned with Flash 7 on...

For more info: I don't like the idea of putting _root in my AS2 class in case I want to load this entire object into a different swf than what I'm originally planning for.

Thanks guys!

_xmouse And _ymouse
i have this code but don't works blurr and the _xmouse and _ymouse not works too!
what is the mistake??
excuse me english

createEmptyMovieClip("crus"+i,10+i)
with(eval("crus"+i)) {
lineStyle(null+2)
lineTo(0,10)
moveTo(-5,5)
lineTo(5,5)
}
xA = _xmouse
yA = _ymouse
Mouse.hide()
eval("crus"+i).onEnterFrame = function() {
xO = xA
yO = yA
xA = _xmouse
yA = _ymouse
diffX = int(xA-xO)/10
diffY = int(yA-yO)/10
for(var i=0; i<10; i++) {
this.duplicateMovieClip("s"+i,i)
h = this["s"+i]
h._x = (diffX*i)+xA
h._y = (diffY*i)+yA
h._alpha = (10*i)-2
}
toggleHighQuality();
updateAfterEvent();
}

_xmouse Movement
I have mc called butterfly for my navigation buttons. When you rollOver the butterfly the navigation buttons shows up. And when I move my mouse to right the butterfly_mc moves to left and moese left= buterfly to right. How to Play FrameLabel on mouse movement? For example if I move mouse from left to right the butterfly butterfly_mc moves to left looking to left

SetProperty Of MovieSymbol With _xMouse?
How can i set the _xposition of a movie symbol depending on where the mouse is positioned??

I want there to be text in the middle of the screen, and when the mouse is to the left (it acts as a light source), the shadow of the text is far right. When the mouse moves to the right, the shadow moves to the center and then to the left. I know i can say, setProperty(shadow,_xposition,(300-xpos), but it's not working..

eric

_XMouse _YMouse _MiniMouse
_XMouse & _YMouse

This command I have no Idea how to use. I have a 800x600 movie and want to set the mouse to 788x588
Can anyone help? Thanxz a million!

-Prostorm

Scroll Relativelz To _xmouse?
Hi gurus... I'm stuck again.
I'm trying to make a menu like the one on http://www.soundofdesign.com , but I can't use the usual way (the one found on http://www.actionscripts.org/tutoria...U/index.shtml) because I want the every button on the menu to be completely different from another, and have different actions... So what I'm currently doing is something like
menu._x = (_xmouse * -1) + 200
Zou can see an example of this at http://www.subwaydesigns.net/sub/subwayv3.html on the links section.
This works more or less, but not perfectly... is there any better way to do this?

Thanks in advance.
-Laz-

_xmouse And _ymouse Events
helpers of this site .. i would really appreciate if you help me in this ..
i saw somone who created this before .. and am 100% sure that it works
..
i cant go through the script this long .. but you can dounload the FLA file ...
http://www.geocities.com/shakabuanas/xmouseevent.fla
....
need help ..
thanx for instance ...

Defining A Range For _xmouse
Here is what I am trying to do, I know that the code is wrong thats where I need your help.

if (xmouse < 1 but > 10){
gotoAndPlay (2);
}else if (_xmouse <11 but >20){
gotoAndPlay (3);
}

basically I want to define a range for the _xmouse and have the if statement take it to a certian frame.

Any help would be appreciated.

Thank You
MikeMadMan

Mask To Follow _XMOUSE
Hey guys,
How do i make it so that a mask follow my _xmouse position. I want it to dynamically move to the location. I understand all of the scripting behind this procedure but I cant seem to get it to work with a mask. Thanks guys
Don

HitTest Or _xmouse Or OnRollOut?
Hi there.
I'm having alittle problem with a Flash nav embedded at the top of a static HTML page.

Essentially, some of the buttons in the nav are staying lit if you move your mouse off the Flash too quickly onto the HTML. I've tried a number of things:

1. using on(rollOut) on the button doesn't get consistent results and doesn't always work turn the button off if you mouse over things quickly.

2. making a small clip and using a startDrag command and a conditional hitTest script with the another clip the size of the stage doesn't work because when you move your mouse past the SWF onto the HTML content the small clip resides at the furthest edge of the SWF border and never returns a value greater than the border of the SWF.

3. using _xmouse and _ymouse to detect the position of the cursor I run into the same problems as above-- essentially the stage is always "active" because the cursor never really leaves the SWF even if I'm in the HTML portion of the page.

Any ideas on how I could conditionally trip the buttons on or off other than what I've tried?? Anyone have a lot of experience doing hybrid Flash/HTML sites?

Thanks for your help...

Controling The Timeline With _xmouse.....pls Help
Hi, I'm very new to advanced actionscript so be gentle
I posted in the Flash MX help forum but didn't get much help...then I figured this place would be better.

I guess most of you has visisted www.yulia-nau.de (down for the moment)
What I want to do is to create a similar effect to the one on the top with a movie where the frames are controled by the position of the x mouse but I have no idea of how to achieve this...

Please is there anyone that could point me to a good tutorial or any other resource, any help would be appreciated.

thanks

StartDrag & _xmouse / _ymouse
I'm replacing the cursor when an object is dragged. I use Mouse.hide() and then use a chaser to replace it. The problem is that once dragging starts the chaser becomes "stuck" to the dragged object, and stops adhering to _xmouse and _ymouse. This looks really aweful when you've reached the boundary of the dragged object, and the chaser is attached to it while the actual mouse is off in the distance. Upon releasing the chaser warps to its place and begins following again.

Any ideas?

Also, I'm using a looping mc with two frames, 2nd frame returns to 1st frame which contains the actions to chase the mouse.

Thanks,

afro

_xmouse & _ymouse Issue...
Hey there...

I have a drag and drop situation where I want to report back the _xmouse and _ymouse when the MC is dropped. Everything is fine, but after 20 in x or 217 in y the location values come back with .95 on the end (ex. y=219.95 or x=22.95)...

Does anyone know why this may be happening or how to fix it??

Thanks for your help!

This Dang _xmouse Thang
G'day folks, and merry xmas. Thus far today I have managed to pull my hair out and contemplate pulling my own teeth. The problem is; I have an external nav.swf loading into a handler in the main timeline and it is 245 x 60 pixels it has five round buttons ontop and a long bar underneath. When you mouse over the buttons the over anim works just fine but I have a mask revealing the button names on the bar, when I move the mouse anywhere on the mainstage the mask moves and it seems to be about 10 pixels out to the right instead of on the mouse, I want the mask only to move when the mouse is over the nav section not the whole stage. Any helps hints tips ideas, wigs? please help I'm going bald.

_xmouse For Just Loaded Swf Not Parent
I have a swf file with a loader component which is loading in a SWF. In this SWF I have code to detect _xmouse. The problem is that it is detecting the _xmouse of the main swf file along with the one I loaded in. I am trying to limit the return of _xmouse just for the loaded in swf.

Wmode = Transparent W/_xmouse
I have a couple swfs overlapping each other on an HTML page. The top swf is a feedback box that displays feedback from the other swf on ther page which is an interaction.

The problem I'm having is displaying a custom cursor when the user is over the feedback box. For this I need to use _xmouse and _ymouse so the cursor knows where it needs to be. In wmode transparent, when I move the cursor off of an object, such as the feedback box, Flash seems to no longer be able to tell where the mouse is.

I tried putting a solid fill covering the whole feedback box swf area and then set it to an _alpha of 0 so Flash would alway be over something, and that works, except now the interaction doesn't work.

Any thoughts?

_t

Scale MC On _xmouse Position
Thank you in advance for any help rendered...

I am having a bit of difficulty with what "should" be a simple effect.

The objective is to have an MC scale when the mouse is vertically alligned with the MC. However; the MC does not scale until the mouse is at a position double the vertical center of the MC.

the MC contains a small circle on one layer, and the following code on two keyframes;

FRAME 1 Code:

//this objects x position
posx = this._x;
//reaction boundaries
lbound = (posx - 50);
rbound = (posx + 50);
//default scale
z = 100;
n = 150;
//scale calcs
upscale = z+(posx-_xmouse);
downscale = n-(_xmouse-posx);
//mouse reactions...
if (_xmouse<lbound) {
(this._yscale=z), (this._xscale=this._yscale);
}
if (_xmouse>rbound) {
(this._yscale=z), (this._xscale=this._yscale);
}
if (_xmouse>lbound && _xmouse<=posx) {
(this._yscale=upscale), (this._xscale=this._yscale);
}
if (_xmouse>posx && _xmouse<rbound) {
(this._yscale=downscale), (this._xscale=this._yscale);
}


FRAME 2 CODE:

gotoAndPlay(1);

---------------------------------

Why doesn't this work???

Please help...

Kindest Regards,

[CS3] _xmouse Sliding Mc Question
Hi, I'm not an experienced flash designer and am putting together a basic horizontal menu with this script...

_root.onEnterFrame = function(){
X = _root._xmouse;
mover._x = mover._x + (X - mover._x)/10
}

...on my timeline, making a very simple graphic (instance name "mover") follow the mouse along the x-axis underneath a horizontal menu. It works fine, my question is, how can I get the "mover" graphic to stop at certain points along the x axis? Specifically I want the graphic to follow the mouse as its doing now and stop at a specific x co-ordinate centered under each menu item...

thanks in advance guys for any input

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