PDA

View Full Version : if statment ????????


MadWilson
11-14-2002, 09:24 PM
// The Button

on (press){
_root.L_size = 1;
}

// The code to size a MC.

onClipEvent (load){
_root.L_size = 0;
}

onClipEvent (mouseMove){
if (_root.L_size){
if (_xmouse < _xmouse + (_xmouse + _root._xmouse)){
_xscale = this._x - _root._xmouse;
}else if (_xmouse > _xmouse + (_xmouse + _root._xmouse)){
_xscale = this._x - _root._xmouse;
}else if (_ymouse < _ymouse + (_ymouse + _root._ymouse)){
_xscale = this._x - _root._ymouse;
}else if (_ymouse > _ymouse + (_ymouse + _root._ymouse)){
_xscale = this._x - _root._ymouse;
}
}
}


What I am haveing a problem with is geting my _ymouse to size my MC? The _xmouse sizes right.

Thanks
MadWislon

annexion
11-15-2002, 01:15 AM
on (press){
_root.L_size = 1;
}

// The code to size a MC.

onClipEvent (load){
_root.L_size = 0;
}

onClipEvent (mouseMove){
if (_root.L_size){
if (_xmouse < _xmouse + (_xmouse + _root._xmouse)){
_xscale = this._x - _root._xmouse;
}else if (_xmouse > _xmouse + (_xmouse + _root._xmouse)){
_xscale = this._x - _root._xmouse;
}else if (_ymouse < _ymouse + (_ymouse + _root._ymouse)){
_yscale = this._y - _root._ymouse;
}else if (_ymouse > _ymouse + (_ymouse + _root._ymouse)){
_yscale = this._y - _root._ymouse;
}
}
}


I think that is what you are looking for, I haven't tried it, but by looking at it, you just forgot to change some of the x values to y, as it seems you just copied the x sizer portion of the code for the y.

Good luck.

MadWilson
11-15-2002, 03:57 AM
I would like to size the Xscale with the ymouse too.So there is 2 buttons one button sizes the Xscale and another button sizes the Yscale but you can move your mouse left and right or up and down to size the MC.

That is my problem.

Thanks
MadWilson