Cascading Style Sheets Tutorial

Flash AS increased production of animation effects blisters

  Effect Demo: 

  Click here to download the source files 

  If a painting, heavy workload and the effect is not good.    We use AS copy of the statement to achieve blisters on the number of properties set to change transparency size.    Video clip in the final set blisters around swing.    This integrated together, we can achieve the effect of the rise in blisters. 

  Concrete steps 

  1, opened a new MX documents.    File attributes and appropriate modifications (400 × 300, a blue background) 

  2, built a movie clip, named as the "h2o."    After entering editors to use drawing tools, drawing a gradual filled blisters.    As shown in Figure 1. 

  Figure 1 drawing blisters 

  3, returned to the scene, a layer named "h2o."    From the library in the "h2o" video clips drop to the bottom of scenes, in the following attributes panel named its分身called "h2o."    As shown in Figure 2. 

  Figure 2 layers "h2o" 

  4, the main scene of a new layer named "as."    Add in a section AS: 

  I = 1 
  While (i <= 30) ( 
  DuplicateMovieClip ( "h2o", "h2o" i, i); 
  SetProperty ( "h2o" i, _x, random (400)); 
  SetProperty ( "h2o" i, _y, random (100) 300); 
  SetProperty ( "h2o" i, _xscale, random (60) 40); 
  SetProperty ( "h2o" i, _yscale, getProperty (eval ( "h2o" i), _xscale)); 
  SetProperty ( "h2o" i, _alpha, random (30) 70); 
  I 
  ) 
  _root.h2o._visible = 0 

  5, specific explained as follows: 

  I = 1 / / initialize variables 
  While (i <= 30) (/ / used to control the amount of water 
  DuplicateMovieClip ( "h2o", "h2o" i, i); / / Copy water 
  SetProperty ( "h2o" i, _x, random (400)) / / X axis in the random distribution of the water to reproduce 
  SetProperty ( "h2o" i, _y, random (100) 300); / / ibid., only replaced by Y-axis 
  SetProperty ( "h2o" i, _xscale, random (60) 40); 
  SetProperty ( "h2o" i, _yscale, getProperty (eval ( "h2o" i), _xscale)); 
  / / 2 AS above water is used to control the size. 
  SetProperty ( "h2o" i, _alpha, random (30) 70); / / used to control the transparency of water 
  I 
  ) 
  _root.h2o._visible = 0 / / will be the main scenes in the water hidden. 

  6, selected film clips, "H2O," added AS: 

  OnClipEvent (load) ( 
  Speed = random (5) 3; 
  ) 
  OnClipEvent (enterFrame) ( 
  This._y -= speed; 
  This._x = random (3)-random (3); 
  If (this._y <-15) ( 
  This._y = random (100) 315; 
  ) 
  ) 

  7, the above AS statement means: 

  OnClipEvent (load) (/ / randomly assigned to the speed of water, water sports more real. 
  Speed = random (5) 3; 
  ) 
  OnClipEvent (enterFrame) ( 
  This._y -= speed; / / Y-axis water used to change the coordinates, so we look in the water is constantly on the rise. 
  This._x = random (3)-random (3); / / on the water in order to campaign more and more genuine, we on the water sloshing around about. 
  If (this._y <-15) (/ / This is the role of IF statements when the water out of the screen, back into the screen in the past. 
  This._y = random (100) 315; 
  ) 
  ) 

  8, preservation test! 



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, div effects

Releated Posts

  • Web effects: expression will be JS, Css combine
  • Web effects: CSS + JS Construction of the picture viewer
  • Let css website effects of translucent picture of web pages
  • More than 30 CSS navigation menu effects
  • CSS production standard navigation menu effects

This entry was posted on Sunday, September 30th, 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.

« Louver effects animation, Flash production methods without AS
Flash production of rolling buffer zone »

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