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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onMouseWheel problem

Status
Not open for further replies.

stalker81

Programmer
Feb 3, 2005
32
HU
Hi!
Ive found this code in the help docs of flash:

this.createEmptyMovieClip("line_mc", this.getNextHighestDepth());
line_mc.lineStyle(2, 0xFF0000, 100);
line_mc.moveTo(0, 100);
line_mc.lineTo(0, 0);
line_mc._x = 200;
line_mc._y = 200;

var mouseListener:Object = new Object();
mouseListener.onMouseWheel = function(delta:Number) {
line_mc._rotation += delta;
};
mouseListener.onMouseDown = function() {
trace("Down");
};
Mouse.addListener(mouseListener);

This is great, but what i need is, to be able to
give two numbers, in between the onMouseDonw functions,
and when the line_mc._rotation reaches one of the numbers it stops
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top