Skip to content

Ecce Signum

Immanentize the Empathy

  • Home
  • About Me
  • Published Works and Literary Matters
  • Indexes
  • Laboratory
  • Notebooks
  • RSS Feed

I R Ub3r 1337

2002-09-09 John Winkelman

I have finally made it back into flash, And i have come up with an egregious hack for drawing a circle using the drawing API. Apparently using curveTo() is rather awkward for drawing a simple circle. This method uses the beginGradientFill() method:

_root.createEmptyMovieClip("grad",1);
 with (_root["grad"]) {
 colors = [0x000000,0x000000,0xffffff,0x000000,0x000000];
 alphas = [0,0,100,0,0];
 ratios = [0,124,128,132,255];
 /* adjust the 'spacing' of the middle three numbers to adjust line thickness */
 matrix = { matrixType:"box", x:0, y:0, w:400, h:400, r: (100/180)*Math.PI };
 beginGradientFill( "radial", colors, alphas, ratios, matrix );
 lineStyle(1,0x000000,100);
 moveTo(0,0);
 lineTo(400,0);
 lineTo(400,400);
 lineTo(0,400);
 lineTo(0,0);
 endFill();
 }

Put this code at the root level of your Flash file and run it. Nothing more need be done. Also, you can find a compiled version here . Sure, it’s not much to look at now, but just think of the possibilities!

Posted in ProgrammingTagged Flash

Post navigation

Nothin’, I Tell Ya
Impermanence

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Personal website of
John Winkelman

John Winkelman in closeup

Archives

Categories

Posts By Month

September 2002
S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930  
« Aug   Oct »

Links of Note

Reading, Writing
Tor.com
Locus Online
The Believer
File 770
IWSG

Watching, Listening
Writing Excuses Podcast
Our Opinions Are Correct
The Naropa Poetics Audio Archive

News, Politics, Economics
Naked Capitalism
Crooked Timber

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

© 2025 Ecce Signum

Proudly powered by WordPress | Theme: x-blog by wpthemespace.com