[]Main无法正常使用,找不到它的定义

Main打点无法使用,找不到定义属性!
已邀请:

q1402907210 - 你猜猜

赞同来自:

如截图这样

wudi199553

赞同来自:

Main的路径不对,你的语法问题,自己再查一下把

wudi199553

赞同来自:

看代码的时候思考一下,我一开始跟你说了是 大致原理,下面的才是实现你想要的效果的解决方案
private var _itemHeight:Number;
        private var _oldY:Number;
        private function onMuseHandler(type:Event,index:int):void
        {
            trace("type:" + type.type + "ddd--" + _list.scrollBar.value + "---index:" + index);
            var curX:Number,curY:Number;
            if(type.type== "mousedown")
            {
                _oldY = Laya.stage.mouseY;
                var itemBox:Box = _list.getCell(index);
                _itemHeight = itemBox.height;
            }else if(type.type == "mouseout")
            {
                curY = Laya.stage.mouseY;
                var chazhiY:Number = Math.abs(curY - _oldY);
                var tempIndex:int = Math.ceil(chazhiY/_itemHeight);
                trace("----------tempIndex:" + tempIndex + "---_itemHeight:" + _itemHeight + "---chazhiY:" + chazhiY);
                var newIndex:int;
                if(curY > _oldY)
                {
                    //向下
                    newIndex = index + tempIndex;
                    _list.tweenTo(newIndex);
                }else
                {
                    //向上
                    newIndex = index - tempIndex;
                    _list.tweenTo(newIndex);
                }
            }
        }

要回复问题请先

商务合作
商务合作