I posted a rant on “releaseOutside” earlier this month – finally, here is the example and the code for making anything a Button in ActionScript 3. I’ve also added some really nice features since then. I realized after venting about dragOver, dragOut, and releaseOutside that, unless you built custom components in ActionScript 2, you probably have no idea what these events actually mean for a Button. So now, instead of imparting the boring details of exactly how a Button should work, I’ve implemented 3 new events: stateUp, stateOver and stateDown.
(more…)
Finding the intersection of two lines is a fairly straightforward algorithm. You find their slopes, factor the equation, simple. But finding the intersection between two quadratic bezier curves doesn’t seem to have a simple equation. From the sources I’ve read (I’ll try and find them again so I can cite and quote them) curve-to-curve intersection can only be solved as an approximation.
There are a lot of cool things you can do once you have both line and curve intersections figured out. For example you can combine two shapes wherever they overlap. You can also do some less obvious things such as path offsets (equivalent to Flash authoring’s Modify > Shapes > Expand Fill)
(more…)
I love starting out a new project. This is the part where I get to sketch on paper for a day or so and really plan out usability and component relationships. I’m just starting out with a new project where I’m in charge of the admin interface for an large web application. It sounds pretty boring? Yeah, it would be if I didn’t take usability seriously, so now it’s a big just a big challenge. And I love design, whether I stink at it or not. My favorite presentations at MAX were the Flash XD (experience design) topics that covered usability and moving graphical interfaces which add to the users experience rather than detract. So I’m sharpening my pencil and hittin’ the paper for the next few days!
There is also a web-based mockup editor by Balsamiq. It’s got its bugs, but works well enough to get the job done. If I weren’t so tied to my paper I might use it. I still recommend checking it out, as it is a cool flash-based design tool complete with undo/redo and free transform.
Wow, making a simple button out of a Sprite in AS3 is not an obvious task. I mean a proper button with correct states and with dragOver, dragOut, and releaseOutside -type behavior. Those who coded much in AS2 know what I’m talking about. When a button is pressed and the mouse moves off the button (still pressed) onto a neighboring button, the second button shouldn’t dispatch the rollOver event and subsequently switch to an over state, the first button shouldn’t dispatch a rollOut but a dragOut, etc etc.
(more…)