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.
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).
A drawn box element using the State Object to udjust its updates based on adding rules at the time of creation.
Working.
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.
Creates a function which can be used to reapply a drawn box on size updates.
Still in the Alpha Stage.
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.
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!
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
Instead of Randomly picking a point on the Stage, these branch from the _xmouse & _ymouse click.
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.
Uses the Object.watch ("property",function); to create and array of selected items and last rolled over item .
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;
Looking at events that can be applied to text fields for various selection methods.
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.
Calculates position in array based on _xmouse/_ymouse.
The above version, distiled down into a class Object.
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.
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....
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.
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.
Just starting to play with angles and positioning.
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.
Same as above, but includes top drag, right/bottom/corner resize handles.