AS3 TweenMax-imumLove

So I’ve been working pretty hard on what started as a TowerDefense game for a tutorial here.  It has since become more complex, less tutorialtastic, and awesome.  … sort of.  I’m happy with where it’s going. Now that I’ve stroked my ego, let me stroke a few more. First off I have to say one of the single-most priceless pieces of code ever is TweenMax.  I know I seem to mention them in every blogpost these days.  When I buy programming books, or browse thru Adobe AS3 Live-Docs , I’m reading to solve a problem.  My brains don’t encyclopedia-ize all of the things I come across.  I don’t need to keep them in my memory, that’s why they’re written elsewhere… in APIs and documentation and stuff that I don’t care about.  …Until I need something.

Read More…
FacebookTwitterGoogle+Share

Stop Propagating! Pt. 1 AS3, Event Handling, and Lil Timmy

I’ve periodically run into issues playing around with EventListeners where I want to remove one EL, and add another in the same function, something similar to the following code below.  First, a quick note on what’s going on in the code so we’re all on the same page.  I have a movie clip “defensive structure,” say, a tower for a Tower Defense game.  It has been added to the stage and I attached an EL to this movie clip of the tower when I added it to the stage, listening for a MOUSE_DOWN event on said tower. Since then, I’ve added a few other movie clips INTO the tower Movie Clip.  The first issue I ran into was that normally I’ll use “e.target” as the “hey what did I click” variable to trace out or find out just what exactly was clicked.  e.target was pointing at a child of my tower movieclip, which gave me a number of errors like, “this function does not belong to this movie clip,” because functions belong to classes, and I’m targeting just a simple sprite or movie clip. However, e.currentTarget returns the containing DisplayObjectContainer of e.target.  Usually e.currentTarget would trace out to be [object Stage], but since I specifically added e.target as a child of my defense movie clip, e.currentTarget is returning the actual object I need, the Defense object. So, let’s take a look:

Read More…

Fisheye Menu Using AS3 and TweenLite

A friend of mine that enjoys bitching until I help her with whatever popped into her head that moment messages me tonight.  “Hey for my site [that you’ll make for me for free because i’m a girl and your friend] I want a menu system like that one I showed you [which you’re supposed to magically remember out of all the sites you’ve seen on the whole internet in your life].” After she re-sent me the link, a beautiful site called ilovedust I took a look at the slick little fish-eye style menu and said, “Yeah that’s Animation, I do code.  Not pretty stuff like that.” After 5 minutes of receiving complaining message (but mostly once my game was finished that I was playing at Kongregate, I actually thought about what was happening in that menu, and after about 20 minutes of coding, had a workable menu.  I thought I’d post the code here and make a little tutorial out of it. I love TweenLite.  And TweenMax.  And pretty much everything at GreenSock.  Once you learn the class, it makes everything so easy.  For those that are here who are AS2 coders… a) Upgrade!  and b) They also have AS2 versions of all of their code.  There are a number of other Tween libraries to choose from. Some perform better than others.  But TweenLite was the first for me that ‘made sense’ in my budding AS3 days, which still continue. This is a quick little example of making a 5 menu-item menu that does stuff when you mouse-over.  You could probably think of a million ways to optimize this code; putting the menu items in a loop to initialize and things like that.  I’m just going to lay it out, and you can make your own better.

Read More…

Joomla and Languages: How to Actually Combine the Two

One of the most frustrating things about Joomla is it’s lack of thorough documentation.  Yeah, there’s an API… yeah there’s a Wiki… but it just seems like there are a  lot of gaps and holes that don’t necessarily have to exist. Here’s a quick tutorial on how to implement languages in your component in Joomla! 1.5. First off, lets talk about why this tutorial is important.  Let’s say you’re creating a component to give site admins a way to easily create a special Links (yes, there’s already one for Joomla, it’s 2am, just go with me on this) section.  On the back-end, you’ve got an “Add Link Category” page that takes admins to a nice form that lets them create a category for links in this component.  So you’ve got text for “Name:” and “Description:” and maybe even “Category Image:” if they want to use an image with the text.  You finish your component and release it, and someone in the Joomla community wants to make a Spanish version of your component.  They would have to dig into your source code and basically re-write all of your inline html that you’ve written; essentially necessitating a while new release of your component in an “English version” and “Spanish version.”

Read More…

My Staff Master Joomla! 1.5 Component Has Finally Launched..

Man, I’m all over the place lately.  Actionscript 3 projects… PHP Development… what’s next?  Crochet you say?  Maybe finally master Bocce ball? So, I’ve been working on a new project as of late.  In doing a site redesign for an older site of mine, I’ve been using Joomla!Framework to structure and build the new site.  I’ve used a number of different PHP frameworks and CMS’s over the years, notably Joomla, Drupal, CakePHP, CodeIgnitor, and WordPress, and I just really, really love Joomla.  Maybe thats because I’ve spent so much time ‘under the hood’ in development, but to me, this CMS/Framework just makes sense and speeds up my development on new sites.

Read More…

So I Jumped Out of a Plane…

I don’t think we realize how much we take for granted that the ground we’re walking on is actually right under our feet. 13,000 feet up… …it’s sortof … not… right under your feet.  And it wasn’t really until I was sitting at the edge of the open plane, dangling my feet into the 60-70knots wind and looking down at the ground that I thought, “Damn, was this really a good idea?”  But by that point it’s too late and you’re out the door and everything is silky smooth.

Read More…

PHP & Biscuits, A Commentary on Frameworks, CMS’s, and haters

Any time I’m discussing coding with a few friends, I find myself feeling like a huge coder-poser for my love of pre-made frameworks and open-source CMS’s.  As I get around to showing a client or friend the backend administration area of a site, I always cringe when they love it because I know the discussion will roll around to me saying, “yeah, I actually didn’t code all that but used an open-source content management system.” And they respond, “…oh.. well neat…”

Read More…