Author Archive

Both machines have demonstrated creative uses of intelligent strategy and brute force in various movies and TV shows.
All specs and info from movies and literature is fair game...so who do you'd think would win and why.

Comments No Comments »

If you use Photoshop you probably appreciate the "Constrain Proportions" checkbox found in some of the application's dialogs and menus.

I like to have this same ability when I'm writing ActionScript to resize objects proportionately too.
Here I use the functions to set the sizes so when I set width, height is changed accordingly.
The same for setting height, the width is changed accordingly.

*Note: I set the inputs to limit the width and height to 500.

Here are two functions for performing proportional resizing by both width and height...
Read the rest of this entry »

Comments No Comments »

This Actionscript 3 function returns some properties that are about a line-to-polygon intersection.
It's useful for knowing all intersection points of a segment intersecting with a polygon, and knowing if the end points of the segment are inside the polygon.

Read the rest of this entry »

Comments No Comments »

Here is an ActionScript 3 function that will return intersection information between a segment and circle.
It's useful to me to know if a segment is partially intersecting with a circle or going completely through.


Read the rest of this entry »

Comments 1 Comment »

The intersection Point of two lines is useful to know. This is a function to find it in AS3.


Read the rest of this entry »

Comments 2 Comments »

One year ago I accidently left this particular  USB Flash Drive in my pants pocket and washed it in my washing machine for an 18 minute hot/cold water cycle...and it still works like new.

One of my USB Flash Drives

Today I accidentally left this same model in my pants and washed it on that same cycle...plus dried it it for 40 minutes on HOT in a  dryer machine...and it still works like new.

That's so awesome!

Comments 1 Comment »

Here is a Flex UI component I've been writing. Click the image to play with what I have made so far.
You can change a variety of properties. The dial and mark are runtime skinnable by setting its "dialBackgroundSkin" or "dialMarkSkin" property to a url with an image. 

Knobs and dials just look cool...I don't know anything about audio editing but I like the site of a sound studio. This is the "Reason" I decided to make a knob component.

Nice Knobs

Comments 1 Comment »

Here is a scrolling background and keyboard control test for some AS3 classes I been working on. I used the image of superman from some sprite graphics I found on the web. The images for his flight positions are loaded dynamically. This is for allowing me to load other images for different characters without changing too much script.

Superman Flash test

Comments No Comments »

When creating a new symbol for MovieClips and other instances you must give them a name a second time again in the Properties panel. For me this can be annoying sometimes. (I name my instances the name I plan to later identify them with actionscript.)

Here is a modification of the "findObjects" I posted earlier. This is handy if you are the type of person that names your symbol items with names you intend to use as their instance name as well.

Maybe you will find this useful or know improvements, either way let me know your thoughts.
Read the rest of this entry »

Comments No Comments »

Here's a JSFL function for returning an Array of all elements with a given instance name in whole Flash Document.
I was trying to make something like JavaScript's "getElementsById()" method.
My intent was to make this compatible with both Flash 8 and CS3 IDEs.

Note: Unfortunately, this method will not find elements that are grouped.
Let me know if this is helpful or if there is a better way to do this.

Example:

 
fl.outputPanel.clear();
var items=findObjects("mybox");
var n=0;
while(n < items.length){
	items[n].rotation=45;
	n++;
}
alert("Found "+items.length+" items.");
 

Read the rest of this entry »

Comments 1 Comment »

Thanks for visiting www.keith-hair.net