Articles Tagged "ActionScript"

FullScreen OnMouseMove Bug

stinkbugHere’s an interesting fact: Going to FullScreen mode causes Flash to temporarily stop executing all onMouseMove events.

I’m sure if someone from Adobe was pressed hard enough they might be able to provide some convoluted ~logical~ reasons why going into full-screen mode stops all onMouseMove events but I’m not buying it. I wasted a few frustrating hours figuring this out and when I searched the web to confirm my suspicions I found no mention of this “feature” so I’m calling it what it is, a BUG.

Here, take a look at this ugly SWF (move your mouse around to draw a line whenever the OnMouseMove event is fired and then press the blue square to toggle fullScreen mode)
Read More

Drawing a Closed Arc Shape

This tutorial provides the ActionScript needed to draw a “Closed Arc” which is my way of describing the solid shape created by connecting a pair of concentric arcs with 2 straight lines. Here’s an illustration to explain:

(If you’re new to drawing arcs I suggest reading my previous circle and arc tutorials for an introduction to trigonometry in Flash.)

In my standard arc drawing tutorial I explained the following ActionScript code
Read More

Flash Scripted Conic Angle Gradient

One of the quirkier aspects of Flash is its lack of a 'conic' gradient fill. The conic gradient has been a mainstay of drawing apps like CorelDraw and Photoshop (where it's called an "Angle Gradient") for ages but Flash still hasn't implemented this basic feature. Go ahead and check... it's not there.

NOTE: This tutorial uses some of the code and concepts from my previous Color Gradient and Circle Drawing tutorials so I highly recommend checking them out for a more in-depth explanation of the following code ...
Read More

Animated Arc Drawing

A recent comment on my Oval Drawing Tutorial asks how to “give the appearance that an oval is being drawn slowly”. Hmmm… this sounds like a job for my handy Arc Drawing Function.

Slowly drawing (or revealing) a circle can be achieved by drawing arcs of an ever-increasing size until the arc is so big that it comes back to the beginning and makes a full circle. The same is true with ovals. First let’s take a look at the basic code for drawing an arc of a circle
Read More

Rotated Oval Tutorial

rotated oval

Making the transition from drawing circles to drawing ovals is pretty simple but when you need to go from drawing ovals to drawing rotated ovals, you might run into a few problems. This article documents some of the pitfalls I encountered and presents them as a learning experience. If you just want some solid code to draw rotated ovals or twisted ellipses, skip ahead to the end of the article and copy the last block of code. If you think you might gain from my experience then by all means… read on.
Read More

How to Draw an Oval

Drawing an oval or ellipse is about as easy as drawing a circle with ActionScript. When drawing a circle you only need one measurement for the circle’s radius but when drawing an oval you need to provide 2. One for the Width of the oval and one for its Height. But before I get too far ahead, let’s take a look at the basic circle drawing code used to draw a simple circle
Read More

Squarshed Squares

I needed an interesting new linear texture so I made this SWF to generate rectangular shapes with the following characteristics:

  • All corners of each rectangular shape align on a single “X” pattern.
  • The “X” crosses through the center of an invisible rectangle with 90 degree corners.
  • The 90 degree corners are each located at the middle of their respective corner areas.

Getting everything to work the way I wanted was a bit more complicated than I initially expected.  The code for the above SWF looks like this: ...
Read More

© Sean O'Shell 2007-2017
css.php