今天看了下《仙侠世界》的印象站,感觉loading等待那段时间的水波效果还不错,就破解出来用用。其他效果一般,树叶飘动效果不错。先看下效果吧,请在下边图片上移动鼠标:

仙侠世界破解的整站效果:点击进入仙侠世界



下边直接贴出Code。
文档类: Main.as

package com.vini123
{
    import com.vini123.utils.Rippler;

    import flash.display.Sprite;
    import flash.display.StageScaleMode;
    import flash.display.StageAlign;
    import flash.events.MouseEvent;

    public class Main extends Sprite
    {
        private var _bg:Bg;
        private var _rippler:Rippler;

        public function Main():void
        {
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            
            _bg = new Bg();
            addChild(_bg);
            _rippler = new Rippler();
            _rippler.Set(_bg, 30, 6);
            
            addEventListener(MouseEvent.MOUSE_MOVE , mouseMoveHandler);
        }

        private function mouseMoveHandler(e:MouseEvent):void
        {
            _rippler.drawRipple(e.stageX, e.stageY , 5, 0.9);
        }
    }
}

 

Rippler.as

package com.vini123.utils
{
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.filters.*;

    public class Rippler
    {

        private var _source:DisplayObject;
        private var _buffer1:BitmapData;
        private var _buffer2:BitmapData;
        private var _defData:BitmapData;
        private var _fullRect:Rectangle;
        private var _drawRect:Rectangle;
        private var _origin:Point;
        private var _filter:DisplacementMapFilter;
        private var _expandFilter:ConvolutionFilter;
        private var _colourTransform:ColorTransform;
        private var _matrix:Matrix;
        private var _scaleInv:Number;

        public function Rippler():void
        {
            _origin = new Point();
        }
        public function Set(_arg1:DisplayObject, _arg2:Number, _arg3:Number=2)
        {
            var _local4:Number;
            var _local5:Number;
            this._source = _arg1;
            this._scaleInv = (1 / _arg3);
            this._buffer1 = new BitmapData((_arg1.width * this._scaleInv), (_arg1.height * this._scaleInv), false, 0);
            this._buffer2 = new BitmapData(this._buffer1.width,this._buffer1.height,false,0);
            this._defData = new BitmapData(_arg1.width,_arg1.height,false,0x7F7F7F);
            _local4 = (this._defData.width / this._buffer1.width);
            _local5 = (this._defData.height / this._buffer1.height);
            this._fullRect = new Rectangle(0,0,this._buffer1.width,this._buffer1.height);
            this._drawRect = new Rectangle();
            this._filter = new DisplacementMapFilter(this._defData,this._origin,BitmapDataChannel.BLUE,BitmapDataChannel.BLUE,_arg2,_arg2,"wrap");
            this._source.filters = [this._filter];
            this._source.addEventListener(Event.ENTER_FRAME, this.handleEnterFrame);
            this._expandFilter = new ConvolutionFilter(3,3,[0.5,1,0.5,1,0,1,0.5,1,0.5],3);
            this._colourTransform = new ColorTransform(1,1,1,1,128,128,128);
            this._matrix = new Matrix(_local4,0,0,_local5);
        }
        
        public function drawRipple(_arg1:int, _arg2:int, _arg3:int, _arg4:Number):void
        {
            var _local5 = (_arg3 >> 1);
            var _local6:int = (((_arg4 * 0xFF) & 0xFF) * _arg4);
            this._drawRect.x = ((-(_local5) + _arg1) * this._scaleInv);
            this._drawRect.y = ((-(_local5) + _arg2) * this._scaleInv);
            this._drawRect.width = (this._drawRect.height = (_arg3 * this._scaleInv));
            this._buffer1.fillRect(this._drawRect, _local6);
        }
        
        public function getRippleImage():BitmapData
        {
            return (this._defData);
        }
        public function destroy():void
        {
            this._source.removeEventListener(Event.ENTER_FRAME, this.handleEnterFrame);
            this._buffer1.dispose();
            this._buffer2.dispose();
            this._defData.dispose();
        }
        private function handleEnterFrame(_arg1:Event):void
        {
            var _local2:BitmapData = this._buffer2.clone();
            this._buffer2.applyFilter(this._buffer1, this._fullRect, this._origin, this._expandFilter);
            this._buffer2.draw(_local2, null, null, BlendMode.SUBTRACT, null, false);
            this._defData.draw(this._buffer2, this._matrix, this._colourTransform, null, null, true);
            this._filter.mapBitmap = this._defData;
            this._source.filters = [this._filter];
            _local2.dispose();
            this.switchBuffers();
        }
        private function switchBuffers():void
        {
            var _local1:BitmapData;
            _local1 = this._buffer1;
            this._buffer1 = this._buffer2;
            this._buffer2 = _local1;
        }

    }
}