Thanks for this... but that should be for reloading just a list... I am
searching something to reload a view...
so I ended up in implementing it on my own (see below - only reacting in the
upper part of the view) but have on question left... What is the best way to
check if I am scrolling a list? Do I have to go through the event targets
parents... or is there an easier way...


private static const REFRESH_ICON_PERCENTAGE_MAX_POSITION:Number = .10;
        private var downPoint:Point;
        private var mouseMoveY:int;

        private function handleMouseDown(event:MouseEvent):void
        {
            if(!refreshIcon.parent && isReloadableView() && mouseY < height
* .2)
            {
                resetRefreshIconStartPosition();
                addMouseListeners();
                downPoint = new Point(mouseX, mouseY);
            }
        }

        private function handleMouseUp(event:MouseEvent):void
        {
            removeMouseListeners();
            removeRefreshIcon();
            if(refreshIcon.y >= getRefreshIconEndPosition())
            {
                dispatchEvent(new ReloadEvent(ReloadEvent.RELOAD, true));
            }
        }

        private function handleMouseLeave(event:Event):void
        {
            removeMouseListeners();
            removeRefreshIcon();
        }

        private function handleMouseMove(event:MouseEvent):void
        {
            if(hasMovedABit())
            {
                if(!refreshIcon.parent)
                {
                    addRefreshIconToNavigator();
                    mouseMoveY = mouseY;
                    resetRefreshIconStartPosition();
                }
                else
                {
                    refreshIcon.y = Math.min(-refreshIcon.height + (mouseY -
mouseMoveY), getRefreshIconEndPosition());
                    refreshIcon.alpha = Math.max(.2, refreshIcon.y /
(unscaledHeight * REFRESH_ICON_PERCENTAGE_MAX_POSITION));
                }
            }
            else
            {
                removeRefreshIcon();
            }
        }



--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/Visual-effects-for-reloading-data-like-in-chrome-browse-facebook-on-mobile-devices-tp12661p12710.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to