Main / Experiments /

The purpose of this section is to test ideas and to have a point of reference back to such experiments. Most are works in progress and by all accounts only parts of current / old projects. The .swf and .fla files are available to download but are mainly used for my own reference.

Interface Methods

  • Draw Box w/Bitmap Fill & Slice9Grid


    Includes a dynamic text box, dynamic font loading, API draw rounded box with applied scale adjusting beginBitmapFill and a slice9grid (to minimize distortion of tiles when scale changes).

  • Draw Box w/Slice9Grid & Additive State Rules - 0


    A drawn box element using the State Object to udjust its updates based on adding rules at the time of creation.

  • Draw Box w/Slice9Grid & Additive State Rules - 1


    Working.

  • State Objects - 0


    Change state by moving mouse left to right accross the whole stage. StateObject holds a rules array and uses delta changes in the form of pseudo-bitwise operators to traverse array index positions and apply state functions per new rule change. In this case, the rules divide the Stage in thirds to apply TextField changes per section.

  • Box Function Generator - 0


    Creates a function which can be used to reapply a drawn box on size updates.

Motion

  • Tween Tester


    Still in the Alpha Stage.

  • Random Bezier Tweening - Interval


    The Random Bezier Tweening uses #include "mc_tween2.as" and roundedBezierSlideTo to utilize fluid motion. The coordinates are all random based on the bounds of the Stage.width and .height. The control points are a random() multiplier of the destination points giving it's semi-unpredictable nature. I also created a function that Randomly Inverts a Number to alternate the control point origins and make it look like it was choosing various routes.

  • Random Bezier Tweening - onEnterFrame


    Here are my own self destructive onEnterFrame events using Penner's bezier equations I used these and more to write my own Ease Class based on onEnterFrames. Robert Penner, you rock!

  • Easing 500 Circles - onEnterFrame


    More fun with easing. This was the start of the Ease class tests. All with their own onEnterFrame easing equations applied... to well, 500 instances! Ok, so it's a little slow, try 200 circles

  • Easing 500 Circles - 2


    Instead of Randomly picking a point on the Stage, these branch from the _xmouse & _ymouse click.

  • Mouse - Delta / Movement , Hover , and Idle Classes


    As projects get more complex I wanted to see if I could condense some common functions. This was my first attempt with the Event Dispatcher and using multiple classes to broadcast events. The .fla is here, but I'll have to figure out a better way to include .as files after this point ( since I'm moving that direction). These are also based on setTimeout() which is a single run Interval with self clean-up. It's undocumented and only in Flash 8.

Selection Methods

  • Selection Object Watch - 0


    Uses the Object.watch ("property",function); to create and array of selected items and last rolled over item .

  • Selection Object Watch - 1


    I refer mostly to this one as the template for my dynamic constructors and selectors. Color show the toggle for selected or not. The largest square has focus and anything not in focus can receive over and out events. As, all the functions are dynamically constructed from a type:# defined in an array;

  • Selection - Text Fields - 0


    Looking at events that can be applied to text fields for various selection methods.

  • Single Click, Double Click, Drag, Drop Prototype - 0


    First round in click & drag prototype. Drag Orange circle to see output. Custom events are applied after the prototype has ran, Predefined Events are included with the prototype when first created.

Math

  • Sort on Drag Over - AS 1.0


    Calculates position in array based on _xmouse/_ymouse.

  • Sort on Drag Over - AS 2.0 Class


    The above version, distiled down into a class Object.

  • Sort on Drag Over | With Groups !!!- AS 2.0 Class


    Original problem with a twist. This version introduces groups & group spacing. In this case, there are groups of 2 for the x and groups of 3 for the y with specific spacing for x/y groups.

  • Reverse Operators Function


    Maybe this is bad form, but I wanted a way to script a reversal on a function I was writing for the sort. Instead of duplicating code, I think I am going to store the operators in a variable function. That way I can adjust positive and negative from one variable change. In Theory....

  • Calculate Stage Ratio on Resize


    Need to calculate the smallest ratio during resize? This does it. Originally created because running a file on your computer will resize at different times. To check it out, download it and run it locally. It'll resize to fit the screen with an FS command which happens AFTER everything in the frame has been read and run.

  • Randomly Invert Number


    This function takes a value and uses Math.random() and Math.round() to create a 1 or 0. If it evaluates to true, it will return the number inverted else unchanged if 0 was created.

  • Angles - 0


    Just starting to play with angles and positioning.

Drawing API

  • Draw Box w/Corner Drag


    Original Box API draw code from Steve Harris. Modified to include corner with drag dynamics and bounds. Shadow also updates on resize and cursor is displayed. Part of the trick with this one is to bypass the start Drag() methods with a onMouseMove() only. That helps along with the conditionals to only register left/right/up/down mouse movements so users don't notice any lag based on _xmouse/_ymouse changes.

  • Draw Multiple Boxes w/Multiple Corner Drags


    Same as above, but includes top drag, right/bottom/corner resize handles.