flash on 2013-1-6
/**
* Copyright jozefchutka ( http://wonderfl.net/user/jozefchutka )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/xxJ9
*/
package
{
import flash.text.TextField;
import flash.events.MouseEvent;
import flash.display.Sprite;
public class FlashTest extends Sprite
{
private var tf:TextField = new TextField;
public function FlashTest()
{
stage.addEventListener(MouseEvent.MOUSE_WHEEL, onWheel);
tf.text = "scroll up or down";
tf.width = stage.stageWidth;
tf.height = stage.stageHeight;
tf.mouseEnabled = false;
addChild(tf);
}
private function onWheel(event:MouseEvent):void
{
event.stopImmediatePropagation();
tf.appendText("\n" + event.delta.toString());
}
}
}