Hello all,
I was trying to find a way to draw some "cool" buttons with AnimationPackage (buttonized, Glass like,....).
I figgured out that I had to use gradientStyle, some masks and stuff... well to see what I mean have a look at: http://www.kirupa.com/developer/mx2004/shinyorbs.htm
I spent a couple of hours but with no success! I have been told that one needs sometime in order to get better at understanding and designing with beginGradientFill (the other name of gradientStyle).
by tweeking code & trying I made .. well I kanda designed by code something that looks like the Sun.
see below for the code.
I had this idea of creating a sort of library (or some code sharing) of shapes and designs made by AnimationPackage coding.
Let me know what you think. Maybe it's just me who's very bad at drawing and who hates it above all.
By the way if you don't understand how to use the gradientStyle have a look at: http://zoneflashmx.free.fr/zone_flashmx_movieclip_52begingradientfill.html
I do not pretend to understand it all... but it helped me a bit... by the way it's in French -:(.
Cheers.
var mcB:MovieClip=this.createEmptyMovieClip("B",this.getNextHighestDepth());
APCore.setAnimationClip(mcB);
var myB:IDrawable = new Ellipse(0,0,28,28);
var colors = [0xFFF000, 0xFFAA00, 0xF0F0D9];
var alphas = [100, 80, 40];
var ratios = [0, 90, 120];
var matrix = {matrixType:"box", x:-60, y:-60, w:120, h:120, r:0};
myB.gradientStyle("radial", colors, alphas, ratios, matrix);
myB.draw();
var myScale:Scale = new Scale(this);
myScale.animationStyle(2);//,Sine.easeOut);
myScale.run(400,400);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Nice. I like the idea of a graphic lib. There are many classes that could benefit from it. Besides the gradientStyle method on all IDrawable classes, I thought about SuperShape, Drawer (maybe even in combination with Animator)
Why not setting up a post in the "Developer" forum of Sourceforge to start collecting stuff like this. If enough people share, we can think about better ways of publication.
Also make sure you've checked the chapters on beginGradientStyle of Colin Moock's ASDG2.
Best,
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
I was trying to find a way to draw some "cool" buttons with AnimationPackage (buttonized, Glass like,....).
I figgured out that I had to use gradientStyle, some masks and stuff... well to see what I mean have a look at:
http://www.kirupa.com/developer/mx2004/shinyorbs.htm
I spent a couple of hours but with no success! I have been told that one needs sometime in order to get better at understanding and designing with beginGradientFill (the other name of gradientStyle).
by tweeking code & trying I made .. well I kanda designed by code something that looks like the Sun.
see below for the code.
I had this idea of creating a sort of library (or some code sharing) of shapes and designs made by AnimationPackage coding.
Let me know what you think. Maybe it's just me who's very bad at drawing and who hates it above all.
By the way if you don't understand how to use the gradientStyle have a look at:
http://zoneflashmx.free.fr/zone_flashmx_movieclip_52begingradientfill.html
I do not pretend to understand it all... but it helped me a bit... by the way it's in French -:(.
Cheers.
var mcB:MovieClip=this.createEmptyMovieClip("B",this.getNextHighestDepth());
APCore.setAnimationClip(mcB);
var myB:IDrawable = new Ellipse(0,0,28,28);
var colors = [0xFFF000, 0xFFAA00, 0xF0F0D9];
var alphas = [100, 80, 40];
var ratios = [0, 90, 120];
var matrix = {matrixType:"box", x:-60, y:-60, w:120, h:120, r:0};
myB.gradientStyle("radial", colors, alphas, ratios, matrix);
myB.draw();
var myScale:Scale = new Scale(this);
myScale.animationStyle(2);//,Sine.easeOut);
myScale.run(400,400);
By the way. the code was called from some AS2 class. And I use mtasc 1.06 to compile.
Nice. I like the idea of a graphic lib. There are many classes that could benefit from it. Besides the gradientStyle method on all IDrawable classes, I thought about SuperShape, Drawer (maybe even in combination with Animator)
Why not setting up a post in the "Developer" forum of Sourceforge to start collecting stuff like this. If enough people share, we can think about better ways of publication.
Also make sure you've checked the chapters on beginGradientStyle of Colin Moock's ASDG2.
Best,
Alex