※現在、「wonderfl build flash online」求人コンテンツ制作に関してのアンケートを実施中です!みなさまのお力添えを頂いて、続々とアンケート結果が集まっていますが、まだまだ募集しております。ご協力のほど、どうぞよろしくお願いいたします!

wonderfl運営事務局
→アンケートページ(※ログインしてからお答えいただけるようになっています。)

 notice: Flash editor updated! Join the development! Thanks to MiniBuilder


FORKED
  1. // forked from mash's Bottle Glass Mountains
  2. // package, import, class definition added by mash
  3. // others are from 
  4. // http://www.25lines.com/finalists/0812/064.txt
  5. package {
  6. import flash.display.*;  
  7. import flash.events.*;  
  8. import flash.text.*;  
  9. import flash.utils.*;
  10. import flash.filters.*;
  11. import flash.geom.*;    
  12. public class project64 extends Sprite {
  13. var fade :Shape;
  14. public function project64() {
  15. /**
  16.  * 25-Line ActionScript Contest Entry
  17.  * 
  18.  * Project: Bottle Glass Mountains
  19.  * Author: Daniil Tutubalin, Tomsk, Russia
  20.  * Email: tutubalin@gmail.com
  21.  * Date: 11/28/2008
  22.  * 
  23.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  24.  * of this software and associated documentation files (the "Software"), to deal
  25.  * in the Software without restriction, including without limitation the rights
  26.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  27.  * copies of the Software, and to permit persons to whom the Software is
  28.  * furnished to do so, subject to the following conditions:
  29.  * 
  30.  * The above copyright notice and this permission notice shall be included in
  31.  * all copies or substantial portions of the Software.
  32.  * 
  33.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  34.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  35.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  36.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  37.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  38.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  39.  * THE SOFTWARE.
  40.  */
  41. // 3 free lines! Alter the parameters of the following lines or remove them.
  42. // Do not substitute other code for the three lines in this section
  43. [SWF(width=600, height=600, frameRate=24, backgroundColor=0x000000)]
  44. stage.align = StageAlign.TOP_LEFT;
  45. stage.scaleMode = StageScaleMode.NO_SCALE;
  46. var landscape:BitmapData = new BitmapData(600,600,false,0);
  47. var map:BitmapData = new BitmapData(600,600,false,0);
  48. var texture:BitmapData = new BitmapData(600,600,false,0);
  49. addChild(new Bitmap(new BitmapData(600,600,false,0)));
  50. landscape.perlinNoise(100,100,1,Math.random()*int.MAX_VALUE,false,false7true);
  51. texture.perlinNoise(100,100,3,Math.random()*int.MAX_VALUE,false,false,2,false);
  52. texture.draw(landscape,null,new ColorTransform(0,1,0,1,0,0,0,0),"screen");
  53. (this.fade = new Shape()).graphics.beginGradientFill("radial",[0xFFFFFF,0],[1,1],[192,255],new Matrix(0.29296875000.29296875300300));
  54. this.fade.graphics.drawRect(0,0,600,600);
  55. texture.draw(this.fade,new Matrix(1.1,0,0,1.1,-30,-30),null,"multiply");
  56. landscape.draw(this.fade,null,null,"multiply");
  57. var rotatedScape:BitmapData = new BitmapData(600,600,false,0);
  58. var rotatedTexture = new BitmapData(600,600,true,0);
  59. var temp:BitmapData = new BitmapData(600,600,true,0);
  60. var displaceFilter:DisplacementMapFilter = new DisplacementMapFilter(map,new Point(), 1620256,"color",0x0,1);
  61. var a:Number = 0;
  62. addEventListener(Event.ENTER_FRAME, function() {
  63.     rotatedScape.draw(landscape,new Matrix(Math.cos(a-=(mouseX-300)/2000), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);
  64.     rotatedTexture.draw(texture,new Matrix(Math.cos(a), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);        
  65.     map.fillRect(map.rect,0)
  66.     for (var i=127; i>=0; i-=16) {
  67.         temp.threshold(rotatedScape,rotatedScape.rect,new Point(), "<=", (128-i)<<80, 0x0000ff00, true);
  68.         map.draw(temp, new Matrix(1,0,0,1,0,i), null"normal");
  69.     }                                          
  70.     map.applyFilter(map,map.rect,new Point(), new BlurFilter(3,3));                                              
  71.     getChildAt(0)["bitmapData"].applyFilter(rotatedTexture, rotatedTexture.rect, new Point(), displaceFilter);
  72. });
  73. }
  74. }
  75. }
noswf
  1. // forked from mash's Bottle Glass Mountains
  2. // package, import, class definition added by mash
  3. // others are from 
  4. // http://www.25lines.com/finalists/0812/064.txt
  5. package {
  6. import flash.display.*;  
  7. import flash.events.*;  
  8. import flash.text.*;  
  9. import flash.utils.*;
  10. import flash.filters.*;
  11. import flash.geom.*;    
  12. public class project64 extends Sprite {
  13. var fade :Shape;
  14. public function project64() {
  15. /**
  16.  * 25-Line ActionScript Contest Entry
  17.  * 
  18.  * Project: Bottle Glass Mountains
  19.  * Author: Daniil Tutubalin, Tomsk, Russia
  20.  * Email: tutubalin@gmail.com
  21.  * Date: 11/28/2008
  22.  * 
  23.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  24.  * of this software and associated documentation files (the "Software"), to deal
  25.  * in the Software without restriction, including without limitation the rights
  26.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  27.  * copies of the Software, and to permit persons to whom the Software is
  28.  * furnished to do so, subject to the following conditions:
  29.  * 
  30.  * The above copyright notice and this permission notice shall be included in
  31.  * all copies or substantial portions of the Software.
  32.  * 
  33.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  34.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  35.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  36.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  37.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  38.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  39.  * THE SOFTWARE.
  40.  */
  41. // 3 free lines! Alter the parameters of the following lines or remove them.
  42. // Do not substitute other code for the three lines in this section
  43. [SWF(width=600, height=600, frameRate=24, backgroundColor=0x000000)]
  44. stage.align = StageAlign.TOP_LEFT;
  45. stage.scaleMode = StageScaleMode.NO_SCALE;
  46. var landscape:BitmapData = new BitmapData(600,600,false,0);
  47. var map:BitmapData = new BitmapData(600,600,false,0);
  48. var texture:BitmapData = new BitmapData(600,600,false,0);
  49. addChild(new Bitmap(new BitmapData(600,600,false,0)));
  50. landscape.perlinNoise(100,100,1,Math.random()*int.MAX_VALUE,false,false7true);
  51. texture.perlinNoise(100,100,3,Math.random()*int.MAX_VALUE,false,false,2,false);
  52. texture.draw(landscape,null,new ColorTransform(0,1,0,1,0,0,0,0),"screen");
  53. (this.fade = new Shape()).graphics.beginGradientFill("radial",[0xFFFFFF,0],[1,1],[192,255],new Matrix(0.29296875000.29296875300300));
  54. this.fade.graphics.drawRect(0,0,600,600);
  55. texture.draw(this.fade,new Matrix(1.1,0,0,1.1,-30,-30),null,"multiply");
  56. landscape.draw(this.fade,null,null,"multiply");
  57. var rotatedScape:BitmapData = new BitmapData(600,600,false,0);
  58. var rotatedTexture = new BitmapData(600,600,true,0);
  59. var temp:BitmapData = new BitmapData(600,600,true,0);
  60. var displaceFilter:DisplacementMapFilter = new DisplacementMapFilter(map,new Point(), 1620256,"color",0x0,1);
  61. var a:Number = 4;
  62. addEventListener(Event.ENTER_FRAME, function() {
  63.     rotatedScape.draw(landscape,new Matrix(Math.cos(a-=(mouseX-300)/2000), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);
  64.     rotatedTexture.draw(texture,new Matrix(10.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);        
  65.     map.fillRect(map.rect,1)
  66.     for (var i=127; i>=0; i-=8) {
  67.         temp.threshold(rotatedScape,rotatedScape.rect,new Point(), "<=", (128-i)<<80, 0x0000ff00, true);
  68.         map.draw(temp, new Matrix(1,0,0,1,2,i), null"normal");
  69.     }                                          
  70.     map.applyFilter(map,map.rect,new Point(), new BlurFilter(3,3));                                              
  71.     getChildAt(0)["bitmapData"].applyFilter(rotatedTexture, rotatedTexture.rect, new Point(), displaceFilter);
  72. });
  73. }
  74. }
  75. }
noswf
  1. // forked from mash's Bottle Glass Mountains
  2. // package, import, class definition added by mash
  3. // others are from 
  4. // http://www.25lines.com/finalists/0812/064.txt
  5. package {
  6. import flash.display.*;  
  7. import flash.events.*;  
  8. import flash.text.*;  
  9. import flash.utils.*;
  10. import flash.filters.*;
  11. import flash.geom.*;    
  12. public class project64 extends Sprite {
  13. var fade :Shape;
  14. public function project64() {
  15. /**
  16.  * 25-Line ActionScript Contest Entry
  17.  * 
  18.  * Project: Bottle Glass Mountains
  19.  * Author: Daniil Tutubalin, Tomsk, Russia
  20.  * Email: tutubalin@gmail.com
  21.  * Date: 11/28/2008
  22.  * 
  23.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  24.  * of this software and associated documentation files (the "Software"), to deal
  25.  * in the Software without restriction, including without limitation the rights
  26.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  27.  * copies of the Software, and to permit persons to whom the Software is
  28.  * furnished to do so, subject to the following conditions:
  29.  * 
  30.  * The above copyright notice and this permission notice shall be included in
  31.  * all copies or substantial portions of the Software.
  32.  * 
  33.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  34.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  35.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  36.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  37.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  38.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  39.  * THE SOFTWARE.
  40.  */
  41. // 3 free lines! Alter the parameters of the following lines or remove them.
  42. // Do not substitute other code for the three lines in this section
  43. [SWF(width=760, height=100, frameRate=24, backgroundColor=0xffffff)]
  44. stage.align = StageAlign.TOP_LEFT;
  45. stage.scaleMode = StageScaleMode.NO_SCALE;
  46. var landscape:BitmapData = new BitmapData(600,600,false,0);
  47. var map:BitmapData = new BitmapData(760,100,false,0);
  48. var texture:BitmapData = new BitmapData(760,100,false,0);
  49. addChild(new Bitmap(new BitmapData(760,100,false,0)));
  50. landscape.perlinNoise(100,100,1,Math.random()*int.MAX_VALUE,false,false7true);
  51. texture.perlinNoise(100,100,3,Math.random()*int.MAX_VALUE,false,false,2,false);
  52. texture.draw(landscape,null,new ColorTransform(0,1,0,1,0,0,0,0),"screen");
  53. (this.fade = new Shape()).graphics.beginGradientFill("radial",[0xffffffff,0],[1,1],[192,255],new Matrix(100130050));
  54. this.fade.graphics.drawRect(0,0,600,600);
  55. texture.draw(this.fade,new Matrix(1.1,0,0,1.1,-30,-30),null,"multiply");
  56. landscape.draw(this.fade,null,null,"multiply");
  57. var rotatedScape:BitmapData = new BitmapData(760,100,false,0);
  58. var rotatedTexture = new BitmapData(760,100,true,0);
  59. var temp:BitmapData = new BitmapData(760,100,true,0);
  60. var displaceFilter:DisplacementMapFilter = new DisplacementMapFilter(map,new Point(), 1620256,"color",0xffffff,1);
  61. var a:Number = 0;
  62. addEventListener(Event.ENTER_FRAME, function() {
  63.     rotatedScape.draw(landscape,new Matrix(Math.cos(a-=(mouseX-50)/2000), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 50*(1-Math.cos(a)+Math.sin(a)), 50*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);
  64.     rotatedTexture.draw(texture,new Matrix(Math.cos(a), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 50*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);        
  65.     map.fillRect(map.rect,0)
  66.     for (var i=127; i>=0; i-=16) {
  67.         temp.threshold(rotatedScape,rotatedScape.rect,new Point(), "<=", (128-i)<<80, 0xffffff00, true);
  68.         map.draw(temp, new Matrix(1,0,0,1,0,i), null"normal");
  69.     }                                          
  70.     map.applyFilter(map,map.rect,new Point(), new BlurFilter(3,3));                                              
  71.     getChildAt(0)["bitmapData"].applyFilter(rotatedTexture, rotatedTexture.rect, new Point(), displaceFilter);
  72. });
  73. }
  74. }
  75. }
noswf
  1. // forked from mash's Bottle Glass Mountains
  2. // package, import, class definition added by mash
  3. // others are from 
  4. // http://www.25lines.com/finalists/0812/064.txt
  5. package {
  6. import flash.display.*;  
  7. import flash.events.*;  
  8. import flash.text.*;  
  9. import flash.utils.*;
  10. import flash.filters.*;
  11. import flash.geom.*;    
  12. public class project64 extends Sprite {
  13. var fade :Shape;
  14. public function project64() {
  15. /**
  16.  * 25-Line ActionScript Contest Entry
  17.  * 
  18.  * Project: Bottle Glass Mountains
  19.  * Author: Daniil Tutubalin, Tomsk, Russia
  20.  * Email: tutubalin@gmail.com
  21.  * Date: 11/28/2008
  22.  * 
  23.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  24.  * of this software and associated documentation files (the "Software"), to deal
  25.  * in the Software without restriction, including without limitation the rights
  26.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  27.  * copies of the Software, and to permit persons to whom the Software is
  28.  * furnished to do so, subject to the following conditions:
  29.  * 
  30.  * The above copyright notice and this permission notice shall be included in
  31.  * all copies or substantial portions of the Software.
  32.  * 
  33.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  34.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  35.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  36.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  37.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  38.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  39.  * THE SOFTWARE.
  40.  */
  41. // 3 free lines! Alter the parameters of the following lines or remove them.
  42. // Do not substitute other code for the three lines in this section
  43. [SWF(width=600, height=600, frameRate=24, backgroundColor=0x000000)]
  44. stage.align = StageAlign.TOP_LEFT;
  45. stage.scaleMode = StageScaleMode.NO_SCALE;
  46. var landscape:BitmapData = new BitmapData(600,600,false,0);
  47. var map:BitmapData = new BitmapData(600,600,false,0);
  48. var texture:BitmapData = new BitmapData(600,600,false,0);
  49. addChild(new Bitmap(new BitmapData(600,600,false,0)));
  50. landscape.perlinNoise(100,100,1,Math.random()*int.MAX_VALUE,false,false7true);
  51. texture.perlinNoise(100,100,3,Math.random()*int.MAX_VALUE,false,false,2,false);
  52. texture.draw(landscape,null,new ColorTransform(0,1,0,1,0,0,0,0),"screen");
  53. (this.fade = new Shape()).graphics.beginGradientFill("radial",[0xFFFFFF,0],[1,1],[192,255],new Matrix(0.29296875000.29296875300300));
  54. this.fade.graphics.drawRect(0,0,600,600);
  55. texture.draw(this.fade,new Matrix(1.1,0,0,1.1,-30,-30),null,"multiply");
  56. landscape.draw(this.fade,null,null,"multiply");
  57. var rotatedScape:BitmapData = new BitmapData(600,600,false,0);
  58. var rotatedTexture = new BitmapData(600,600,true,0);
  59. var temp:BitmapData = new BitmapData(600,600,true,0);
  60. var displaceFilter:DisplacementMapFilter = new DisplacementMapFilter(map,new Point(), 1620256,"color",0x0,1);
  61. var a:Number = 0;
  62. addEventListener(Event.ENTER_FRAME, function() {
  63.     rotatedScape.draw(landscape,new Matrix(Math.cos(a-=(mouseX-300)/2000), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);
  64.     rotatedTexture.draw(texture,new Matrix(Math.cos(a), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);        
  65.     map.fillRect(map.rect,0)
  66.     for (var i=127; i>=0; i-=16) {
  67.         temp.threshold(rotatedScape,rotatedScape.rect,new Point(), "<=", (128-i)<<80, 0x0000ff00, true);
  68.         map.draw(temp, new Matrix(1,0,0,1,0,i), null"normal");
  69.     }                                          
  70.     map.applyFilter(map,map.rect,new Point(), new BlurFilter(3,3));                                              
  71.     getChildAt(0)["bitmapData"].applyFilter(rotatedTexture, rotatedTexture.rect, new Point(), displaceFilter);
  72. });
  73. }
  74. }
  75. }
noswf
  1. // forked from mash's Bottle Glass Mountains
  2. // package, import, class definition added by mash
  3. // others are from 
  4. // http://www.25lines.com/finalists/0812/064.txt
  5. package {
  6. import flash.display.*;  
  7. import flash.events.*;  
  8. import flash.text.*;  
  9. import flash.utils.*;
  10. import flash.filters.*;
  11. import flash.geom.*;    
  12. public class project64 extends Sprite {
  13. var fade :Shape;
  14. public function project64() {
  15. /**
  16.  * 25-Line ActionScript Contest Entry
  17.  * 
  18.  * Project: Bottle Glass Mountains
  19.  * Author: Daniil Tutubalin, Tomsk, Russia
  20.  * Email: tutubalin@gmail.com
  21.  * Date: 11/28/2008
  22.  * 
  23.  * Permission is hereby granted, free of charge, to any person obtaining a copy
  24.  * of this software and associated documentation files (the "Software"), to deal
  25.  * in the Software without restriction, including without limitation the rights
  26.  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  27.  * copies of the Software, and to permit persons to whom the Software is
  28.  * furnished to do so, subject to the following conditions:
  29.  * 
  30.  * The above copyright notice and this permission notice shall be included in
  31.  * all copies or substantial portions of the Software.
  32.  * 
  33.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  34.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  35.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  36.  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  37.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  38.  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  39.  * THE SOFTWARE.
  40.  */
  41. // 3 free lines! Alter the parameters of the following lines or remove them.
  42. // Do not substitute other code for the three lines in this section
  43. [SWF(width=600, height=600, frameRate=24, backgroundColor=0x000000)]
  44. stage.align = StageAlign.TOP_LEFT;
  45. stage.scaleMode = StageScaleMode.NO_SCALE;
  46. var landscape:BitmapData = new BitmapData(600,600,false,0);
  47. var map:BitmapData = new BitmapData(600,600,false,0);
  48. var texture:BitmapData = new BitmapData(600,600,false,0);
  49. addChild(new Bitmap(new BitmapData(600,600,false,0)));
  50. landscape.perlinNoise(100,100,1,Math.random()*int.MAX_VALUE,false,false7true);
  51. texture.perlinNoise(100,100,3,Math.random()*int.MAX_VALUE,false,false,2,false);
  52. texture.draw(landscape,null,new ColorTransform(0,1,0,1,0,0,0,0),"screen");
  53. (this.fade = new Shape()).graphics.beginGradientFill("radial",[0xFFFFFF,0],[1,1],[50,255],new Matrix(0.29296875000.29296875300300));
  54. this.fade.graphics.drawRect(0,0,600,600);
  55. texture.draw(this.fade,new Matrix(1.1,0,0,1.1,-30,-30),null,"multiply");
  56. landscape.draw(this.fade,null,null,"multiply");
  57. var rotatedScape:BitmapData = new BitmapData(600,600,false,0);
  58. var rotatedTexture = new BitmapData(600,600,true,0);
  59. var temp:BitmapData = new BitmapData(600,600,true,0);
  60. var displaceFilter:DisplacementMapFilter = new DisplacementMapFilter(map,new Point(), 520256,"color",0x0,1);
  61. var a:Number = 0;
  62. addEventListener(Event.ENTER_FRAME, function() {
  63.     rotatedScape.draw(landscape,new Matrix(Math.cos(a-=(mouseX-300)/2000), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);
  64.     rotatedTexture.draw(texture,new Matrix(Math.cos(a), 0.7*Math.sin(a), -Math.sin(a), 0.7*Math.cos(a), 300*(1-Math.cos(a)+Math.sin(a)), 210*(1-Math.sin(a)-Math.cos(a))),null,null,null,true);        
  65.     map.fillRect(map.rect,0)
  66.     for (var i=127; i>=0; i-=16) {
  67.         temp.threshold(rotatedScape,rotatedScape.rect,new Point(), "<=", (128-i)<<80, 0x0000ff00, true);
  68.         map.draw(temp, new Matrix(1,0,0,1,0,i), null"normal");
  69.     }                                          
  70.     map.applyFilter(map,map.rect,new Point(), new BlurFilter(3,3));                                              
  71.     getChildAt(0)["bitmapData"].applyFilter(rotatedTexture, rotatedTexture.rect, new Point(), displaceFilter);
  72. });
  73. }
  74. }
  75. }
noswf
Get Adobe Flash Player