Cascading Style Sheets Tutorial

Three mouse with the realization of effects animation

  Look at the results 

src=http://www.webjx.com/htmldata/2005-06-29/&

quality=high

pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'

type='application/x-shockwave-flash' width=400

height=300>   Http://www.flash8.net/bbs/UploadFile/2005-6/200562412045497.swf 


  This is because as is prepared, so I cling to the source document, as long as the code copied to the flash as in the first frame on the 

  Stage.scaleMode = "noScale" 
  Stage.align = "TL" 
  For (i = 1; i <= 4; i) ( 
  _root.createEmptyMovieClip ( "Point" i, 0-i); / / new MC 
  / / Mc of the x-axis, y-axis 
  _root [ "Point" i]. _x = Stage.width / 2; 
  _root [ "Point" i]. _y = Stage.height / 2; 
  / / Mouse across the effectiveness of 
  _root [ "Point" i]. OnMouseMove = function () ( 
  This._x = _root._xmouse (Math.random () * 70) -35; 
  This._y = _root._ymouse (Math.random () * 70) -35; 
  ); 
  ) 
  / / Set a color group 
  HexColors = new Array ( "0xCC00FF", "0xCC33FF", "0xCC66FF", "0xCC99FF", "0xCCCCFF", "0xCCFFFF"); 
  / / Mouse lit up when new mc, and filled with random color and alpha values were established 
  This.onMouseMove = function () ( 
  I; 
  This.createEmptyMovieClip ( "shape" i, i * 10); 
  With (this [ "shape" i]) ( 
  BeginFill (hexColors [Math.floor (Math.random () * hexColors.length)], (Math.random () * 40) 60); 
  / / Draw a line implementation procedures 
  MoveTo (_root.point1._x, _root.point1._y); 
  CurveTo (_root.point2._x, _root.point2._y, _root.point3._x, _root.point3._y); 
  CurveTo (_root.point4._x, _root.point4._y, _root.point1._x, _root.point1._y); 
  EndFill (); 
  ) 
  / / Copy the current mc based X, Y-axis, alpha values, and filled with color, as a shadow. 
  This [ "shape" i]. DuplicateMovieClip ( "shadow" i, (10 * i) -1); 
  This [ "shadow" i]. _x This = [ "shape" i]. _x 6; 
  This [ "shadow" i]. _y This = [ "shape" i]. _y 6; 
  This [ "shadow" i]. _alpha = 60; 
  This.grey = new Color (this [ "shadow" i]); 
  This.grey.setRGB ( "0×999999"); 
  ); 

  Only a simple explanation, as the basis for a friend learning 

  Stage.scaleMode = "noScale"; 
  Stage.align = "TL"; 
  For (i = 1; i <= 4; i) ( 
  _root.createEmptyMovieClip ( "Point" i, 0-i); 
  / / New MC 
  / / Mc of the x-axis, y-axis 
  _root [ "Point" i]. _x = Stage.width / 2; 
  _root [ "Point" i]. _y = Stage.height / 2; 
  / / Mouse across the effectiveness of 
  _root [ "Point" i]. OnMouseMove = function () ( 
  This._x = _root._xmouse (Math.random () * 70) -35; 
  This._y = _root._ymouse (Math.random () * 70) -35; 
  ); 
  ) 
  / / Set a color group 
  HexColors = new Array ( "0xCC00FF", "0xCC33FF", "0xCC66FF", "0xCC99FF", "0xCCCCFF", "0xCCFFFF"); 
  / / Mouse lit up when new mc, and filled with random color and alpha values were established 
  This.onMouseMove = function () ( 
  I; 
  This.createEmptyMovieClip ( "shape" i, i * 10); 
  With (this [ "shape" i]) ( 
  BeginFill (hexColors [Math.floor (Math.random () * hexColors.length)], (Math.random () * 40) 60); 
  / / Draw a line implementation procedures 
  MoveTo (_root.point1._x, _root.point1._y); 
  CurveTo (_root.point2._x, _root.point2._y, _root.point3._x, _root.point3._y); 
  CurveTo (_root.point4._x, _root.point4._y, _root.point1._x, _root.point1._y); 
  EndFill (); 
  ) 
  / / Copy the current mc based X, Y-axis, alpha values, and filled with color, as a shadow. 
  This [ "shape" i]. DuplicateMovieClip ( "shadow" i, (10 * i) -1); 
  This [ "shadow" i]. _x This = [ "shape" i]. _x-6; 
  This [ "shadow" i]. _y This = [ "shape" i]. _y 6; 
  This [ "shadow" i]. _alpha = 60; 
  This.grey = new Color (this [ "shadow" i]); 
  This.grey.setRGB ( "0×999999"); 
  ); 
  / / Delete some of the increase 
  Var ii: Number = 6; 
  Function del () ( 
  If (_root [ "shape" ii]) ( 
  _root [ "Shape" ii]. RemoveMovieClip (); 
  _root [ "Shadow" ii]. RemoveMovieClip (); 
  Ii; 
  ) 
  ) 
  SetInterval (del, 10); 

  Results are as follows: 

src=http://www.webjx.com/htmldata/2005-06-29/&

quality=high

pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'

type='application/x-shockwave-flash' width=400

height=300>   Http://www.flash8.net/bbs/UploadFile/2005-6/200562418334546.swf 

  In fact, the original better, the more to a greater Buhaokan 

  Import mx.transitions.Tween; 
  Import mx.transitions.easing .*; 
  Var i: Number = 0; 
  Var mcname: Number = 0; 
  Var x: Number = _xmouse, y: Number = _ymouse; 
  Var rgb: Array = new Array ( "0" and "1", "2", "3" and "4" and "5", "6", "7" and "8", "9", "A "," B "and" C "," D "," E "and" F "); 
  Var mousemove: Object = new Object (); 
  Mousemove.onMouseMove = function () ( 
  Fline (); 
  ); 
  Function fline () ( 
  Var a: Number = Math.floor (Math.random () * 16); 
  Var b: Number = Math.floor (Math.random () * 16); 
  Var c: Number = Math.floor (Math.random () * 16); 
  Var d: Number = Math.floor (Math.random () * 16); 
  Var e: Number = Math.floor (Math.random () * 16); 
  Var f: Number = Math.floor (Math.random () * 16); 
  Var g: Number = Math.floor (Math.random () * 6); 
  This.createEmptyMovieClip ( "line" i, i); 
  Mycolor = new Color (this [ "line" i]); 
  Mycolor.setRGB ( "0x" rgb rgb [a] [b] rgb rgb [c] [d] rgb rgb [e] [f]); 
  With (this [ "line" i]) ( 
  LineStyle (g, 0×0000, 100); 
  MoveTo (x, y); 
  LineTo (_xmouse, _ymouse); 
  ) 
  X = _xmouse; 
  Y = _ymouse; 
  Mcname_mc this = [ "line" i]; 
  I; 
  ) 
  SetInterval (enterframes, 10); 
  Function enterframes () ( 
  If (_root [ "line" mcname]) ( 
  Fdown (_root [ "line" mcname]); 
  Mcname; 
  ) 
  ) 
  Function fdown (mc_mc: MovieClip) ( 
  Var i: Number = mc_mc._y; 
  Down = new Tween (mc_mc, "_y" Elastic.easeIn, i, i 200, 1, true); 
  Down.onMotionStopped = function () ( 
  Mc_mc.removeMovieClip (); 
  ); 
  ) 
  Mouse.addListener (mousemove); 


  The original: 
  Import mx.transitions.Tween; 
  Import mx.transitions.easing .*; 
  Var i: Number = 0; 
  Var mcname: Number = 0; 
  Var x: Number = _xmouse, y: Number = _ymouse; 
  Var mousemove: Object = new Object (); 
  Mousemove.onMouseMove = function () ( 
  Fline (); 
  ); 
  Function fline () ( 
  Var a: Number = Math.random () * 5; 
  Var b: Number = Math.random () * 100; 
  This.createEmptyMovieClip ( "line" i, i); 
  With (this [ "line" i]) ( 
  LineStyle (1, 0×0000, 100); 
  MoveTo (x, y); 
  LineTo (_xmouse, _ymouse); 
  ) 
  X = _xmouse; 
  Y = _ymouse; 
  Mcname_mc this = [ "line" i]; 
  I; 
  ) 
  SetInterval (enterframes, 10); 
  Function enterframes () ( 
  If (_root [ "line" mcname]) ( 
  Fdown (_root [ "line" mcname]); 
  Mcname; 
  ) 
  ) 
  Function fdown (mc_mc: MovieClip) ( 
  Var i: Number = mc_mc._y; 
  Down = new Tween (mc_mc, "_y" Elastic.easeIn, i, i 200, 1, true); 
  Down.onMotionStopped = function () ( 
  Mc_mc.removeMovieClip (); 
  ); 
  ) 
  Mouse.addListener (mousemove); 

  Results are as follows: 

src=http://www.webjx.com/htmldata/2005-06-29/&

quality=high

pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'

type='application/x-shockwave-flash' width=400

height=300>   Http://www.flash8.net/bbs/UploadFile/2005-6/20056240037515.swf 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Tags: css effects firefox, css mouse style, div effects

Releated Posts

  • CSS + JavaScript build Hover your mouse over picture effects Out!
  • Flash follow the mouse changes the filter effects
  • Rotational effects mouse sensors flowers
  • Flash mouse cool particle effects
  • Flash interesting mouse combat the effects

This entry was posted on Friday, August 31st, 2007 at 12:00 am and is filed under Css+Div Web Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Chinese version of the Flash 8 Video Guide (18) effects - Projection
Introduced a method of making snow filled »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial