Archive for the “ActionScript 3” Category

Yea yea, I know Battlestar Galactica is over, but today I thought of the "Daybreak part 1" episode of BSG.
Hera, a little girl has been kidnapped by the Cylons. As part of a desperate plan to save Hera, Admiral Adama draws a red line on the deck, and asks for those willing to risk their lives to save her, do so by crossing the line.

I had a similar problem also with my scripts. I wanted to simply know if a Point was behind a Line or not... :)

Read the rest of this entry »

Vote in HexoSearch

Comments 1 Comment »

After writing a function to test intersections of a line to a polygon, another problem came up where I needed
to test an intersection of a line to a curve. I'm sure there is a library someone has wrote that could do this but there is some fun in figuring out puzzles.
There was a recent comment about curves and intersections so I decided to go ahead an post what I attempted.
I feel using a loop is expensive, but it's all I can think of doing for this, similar to the lineIntersectPoly function.


Read the rest of this entry »

Vote in HexoSearch

Comments 1 Comment »

I was wanting a lightweight function to resize, rotate, and skew DisplayObjects based on a dynamic registration point so I made a function to apply my desired matrix settings.

One thing that bothers me is that I could not figure out how to skew along the X and Y axis at the same time. When I do set "c" and "b" Matrix properties, one of the skewed axis does not skew parallel like it should. And if I concatenate separate skew Matrices, the last concatenated skew Matrix transforms correctly but not the one before it. I'm trying to avoid using nested DisplayObjects to perform the separate X and Y skews, but that looks like an option I will have to use.


Read the rest of this entry »

Vote in HexoSearch

Comments 4 Comments »

Thanks for visiting www.keith-hair.net