これは私にとってはうまくいきました。コメントはありませんが、かなり簡単です。.fla (含まれていない) にはすべて、すべてのアイテムを含む scroll_container という MC があります。
private var hasScrolled:Boolean = false;
private var checkForScroll:Boolean = false;
private var oldMouse:Point;
public function IOSScrollTest() {
addEventListener( MouseEvent.MOUSE_DOWN, MouseDown );
addEventListener( MouseEvent.MOUSE_UP, MouseUp );
addEventListener( Event.ENTER_FRAME, EnterFrame );
}
private function MouseDown( e:MouseEvent ) {
hasScrolled = false;
checkForScroll = true;
oldMouse = new Point( mouseX, mouseY );
}
private function MouseUp( e:MouseEvent ) {
if( ! hasScrolled ) {
// Do your stuff here (onClick things)
}
checkForScroll = false;
}
private function EnterFrame( e:Event ) {
if( checkForScroll ) {
var diff:Number = mouseY - oldMouse.y;
if( Math.abs(diff) > 2 ) {
hasScrolled = true;
oldMouse = new Point( mouseX, mouseY );
scroll_container.y += diff;
}
}
}