var WaveArray:Array = new Array();
var rel_btn:MovieClip = this.loader.btn; this.createEmptyMovieClip("gradient_mc", 3); gradient_mc.cacheAsBitmap = true; mc.cacheAsBitmap = true; onMouseDown = function () { new Wave(WaveArray); }; onEnterFrame = draw; function draw() { with (gradient_mc) { clear(); spreadMethod = "pad"; interpolati; fillType = "radial"; colors = [0x00FFFF, 0xFFFFFF, 0x00FFFF]; var wal:Number = WaveArray.length; for (var i:Number = 0; i<wal; i++) { alphas = [0, WaveArray.A, 0]; var t:Number = WaveArray.R-10; ratios = [t>0 ? t : 0, WaveArray.R, WaveArray.R+10]; focalPointRatio = 0; matrix = {matrixType:"box", x:WaveArray.X-550, y:WaveArray.Y-400, w:550*2, h:400*2, r:180*Math.PI}; beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod, interpolationMethod, focalPointRatio); moveTo(0, 0); lineTo(0, 400); lineTo(550, 400); lineTo(550, 0); lineTo(0, 0); endFill(); } } mc.setMask(gradient_mc); } |
///////////////////////////////////////////http://www.25swf.com
//////code by 25swf //////tinsgao@126.com //////2006.11.23 //////////////////////////////////////////////////////////////////// import flash.geom.Point; class Wave { ///////////////////////////field///////////////////////// private var m_alpha:Number = 100; private var m_ratio:Number = 0; private var m_point:Point; private var rel_array:Array; private var m_iner:Number; ////////////////////////////attribute//////////////////// function get A() { return m_alpha; } function get R() { return m_ratio; } function get X() { return m_point.x; } function get Y() { return m_point.y; } ///////////////////////////////////////////////////////// function Wave(_array:Array) { this.rel_array = _array; _array.push(this); m_point = new Point(_root._xmouse, _root._ymouse); this.m_iner = setInterval(function (_rel) { _rel.m_alpha--; _rel.m_ratio+=2; if (_rel.m_alpha<=1) { _rel.Del(); clearInterval(_rel.m_iner); } }, 50, this); } function Del() { for (var a in rel_array) { if (rel_array[a] == this) { rel_array.splice(a, 1); } } delete this; } } |
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |