Iheartactionscript - iheartactionscript.com
General Information:
Latest News:
Method Verification in Actionscript 3 29 Mar 2010 | 11:10 am
ReferenceError: Error #1069: Property doSomething not found on YourObject and there is no default value. Look familiar? Let’s say you want to verify an object has a method before calling that method -...
Tracing out embedded fonts 19 Jun 2009 | 05:19 pm
One thing I’ve noticed (especially in cs4) is a hard time identifying the names of the fonts you’re embedding. For instance: the font I was using “Helvetica Neue BlackItalic” (as in the IDE) when trac...
Try/Catch Example 17 Jun 2009 | 06:24 pm
So I’ve been thinking of a non-hacky way to use try/catch - and I finally found one (I think). try { var classRef:Class = getDefinitionByName($name) as Class; } catch(e:*) { trace(e) } G...
if() return; 4 Jan 2008 | 08:00 am
I decided to write a quick little post about the advantages of using “return”. Return works in a really cool way (for those of you who don’t know). Traditionally you use it like this: // whatever co...
Replacing Strings in AS3 9 Oct 2007 | 12:41 pm
Although this may be pretty basic - when it comes to dealing with strings, one of the most valuable methods is no doubt the split().join(). So let’s first go over split(). This is from adobe’s live ...
Dynamic Masking using Tweener 6 Oct 2007 | 06:25 pm
Here’s a little experiment I did inspired by the new Adidas site. I totally loved their masking technique - Here’s my take: You need the Flash Player to view this. DOWNLOAD SOURCE (more…)
stage access out of DocumentRoot in AS3 28 Sep 2007 | 02:28 pm
One of my first challenges in understanding AS3 was the idea that Stage and _root are no longer global (and this is a good thing). DISCLAIMER: In general, accessing root is considered a crap coding p...
Disabling a button in AS3 (myMC.enabled in AS3) 27 Sep 2007 | 08:57 pm
I ran across the problem the other day of trying to disable a button without removing its MouseEvent listeners. In AS2 you could simply disable a button by setting it’s “enabled” property to false. ...
useHandCursor on a MovieClip in AS3 27 Sep 2007 | 08:45 pm
To use a hand cursor on a MovieClip that already has event listeners - you simply need two lines of code to use a hand cursor: myMC.buttonMode = true; myMC.useHandCursor = true; AS3 doesn’t automat...
Loading an External .swf in AS3 22 Sep 2007 | 09:42 am
Here’s a simple example of loading a .swf in AS3. I had a typo before but now it’s fixed - sorry about that. Also, I updated it so you don’t have to strictly use it in an Class setting. Happy Coding…...