Cascading Style Sheets Tutorial

Junior: On AS mapping function and a few simple examples

  Movie clip object mapping methods are mainly in the following four: 
  MoveTo (x, y); decided to start painting the location; 
  LineTo (x, y); Dra; 
  CurveTo (x1, y1, x2, y2); drawing curves, x1, y1 control, x2, y2 the end; 
  Clear (); under way to remove all the graphics graphics; 
  Lines and set up the four color image: 
  LineStyle (a, b, c); definition color and thickness of the lines, a line for the thickness, b for the RGB color values in hexadecimal, c transparency (1-100); 
  BeginFill (a, b) definition of the beginning of color and fill the position as a color RGB hexadecimal value, b transparency (1-100); 
  BeginGradientFill (fillType, colors, alphas, ratios, matrix); definition graded colors and the beginning of filling positions, five parameters, fillType filled type, color array of colors, from left to right [a, b], a, b, respectively 16 hex RGB color, transparency alphas color array, the array of ratios of color, gradual control of the direction of matrix; 
  EndFill (); by the end of beginFill () or beginGradientFill () began filling. 
  1, a new line drawing files, settings, the background is black, 24, in the first frame F9 opened by the action panel, enter the following code: 
  LineStyle (2,0 xff6600, 100); 
  MoveTo (0,0); 
  LineTo (0300); 2, drawing curves to enter the following code: 
  LineStyle (2,0 xff6600, 100); 
  MoveTo (150,120); 
  CurveTo (240,300,400,250); 
  3, filled with the realization of color 
  BeginFill (0xffcc00, 100); 
  LineStyle (2,0 xff6600, 100); 
  MoveTo (0,0); 
  LineTo (0,300); 
  LineTo (400,300); 
  LineTo (400,0); 
  LineTo (0,0); 
  EndFill (); 4, filled with color graded 
  _root.createEmptyMovieClip ( "Sq," 1); 
  With (_root.sq) ( 
  Colors = [0xFF0000, 0xFFFF00]; 
  Alphas = [100, 100]; 
  Ratios = [0, 0xFF]; 
  Matrix = (matrixType: "box", x: 400, y: 400, w: 500, h: 500, r: (-45/180) * Math.PI); 
  BeginGradientFill ( "linear" colors, alphas, ratios, matrix); 
  MoveTo (31, 51); 
  LineTo (31, 331); 
  LineTo (331, 331); 
  LineTo (331, 31); 
  LineTo (31, 31); 
  EndFill (); 
  ) 

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: layout examples

Releated Posts

  • Rational use HTML tags to CSS layout
  • ASP deal with a form submitted by the Ajax examples
  • AJAX prepared with examples and technical user registration Summary
  • Making Guide website: CSS page layout realization
  • CSS primary entry: (1) The overall layout statement

This entry was posted on Tuesday, October 23rd, 2007 at 12:00 am and is filed under CSS Tutorial By Examples. 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.

« Ajax: embrace JSON, XML walk away
Flash entry and learning the correct way to AS Programming »

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