Create Gradient box : Gradient « Graphics « Flash / Flex / ActionScript

Flash / Flex / ActionScript
1. Animation
2. Array
3. Class
4. Data Type
5. Development
6. Function
7. Graphics
8. Language
9. Network
10. Regular Expressions
11. Statement
12. String
13. TextField
14. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Flash / Flex / ActionScript » Graphics » Gradient 
Create Gradient box
 

import flash.display.GradientType;
import flash.display.Sprite;
import flash.geom.Matrix;
     
class Ball extends Sprite {

     public function Ball() {
          var colors:Array = [];
          var pMatrix:Matrix = new Matrix();
          pMatrix.createGradientBox(70700, -45, -32);
          graphics.beginGradientFill(GradientType.RADIAL, [0xFF0000,0x330000][1,1][0,0xFF], pMatrix);
          graphics.drawCircle(0025);
          graphics.endFill();
     }

}

        
Related examples in the same category
1. Line Gradient Test
2. Create a Ball by using the Gradient
3. Applying Gradients to Lines
4. Set line gradient style with Matrix
5. lineGradientStyle("linear", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "reflect", "linearRGB")
6. lineGradientStyle("radial", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "pad", "linearRGB")
7. lineGradientStyle("radial", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "pad", "linearRGB", 1)
8. Applying Gradient Fills
9. A shape with evenly rounded corners
10. Rotating Objects with Filters
w___ww_.___j_a_v___a___2_s___.___c___o___m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.