Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

key.isDown for mouse key

Status
Not open for further replies.

surf2003

Programmer
Aug 23, 2003
3
GB
Helllo!

Is there a way to determine if the left mouse key is pressed? I have an onClipEvent (mouseDown)in which I drag an object and a onClipEvent (enterFrame) in which I resize the same object. But the resizing should only happen if the mouse key is down. Any ideas?

Thanks for your help!
Steve
 
something like this

myclip.onMouseDown = function(){
if(this.hitTest(_root._xmouse, _root._ymouse, true))
resize = true;
}
myclip.onMouseUp = function(){
resize = false;
}
myclip.onEnterFrame = function(){
if(resize) this._xscale+=10
}

stop()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top