My Name Is Rich

Icon

Flash Tip: Conditional Compiling

Debuging is a craft in it’s own and it’s always helpful to find new tips and tricks. So, I’m writing to post about a new trick for helping us Flash coders debug our sweet, buggy code. Adobe put in a new feature in Flash CS4 called Conditional Compiling and you can read more about it from InsideRIA’s article.

The basic idea is that you can use a compiler constant called CONFIG::Debug to tell the compile when to run some code. If the constant is set to true it’ll be run if it’s set to false then it won’t. Simple, right? Before you start coding you’ll want to go into your Actionscript 3 settings and click on the last tab surprisingly called “Config constants”. Here you can create the constant and set it’s value.

Now that you are all set you you can then use code such as this to see it in action.

1
2
3
4
5
6
7
8
9
var val:int = 0;
for (var i:int = 0; i < 200; i++)
{
    val += i * .5;
    CONFIG::Debug
    {
        trace(val);
    }
}

And that’s it. It’s a small tip but one that I’ll be definitely using from now on in my projects. If you want to see another simple example I’ve put up a zip file located here for your viewing pleasure.

Quick Flash Tip: Centering the Stage

Ok this is a quick tip that I figured to pass along. It’s nothing revolutionary but it has helped me a lot daily.

So here’s the problem. You want to zoom into an object or multiple objects on the stage. What happens when you zoom in? Sometimes Flash will go to the area you expected and other times it’ll just go over waaaaaay to the left or right or anywhere it feels like. Now, you’re stuck looking at a blank screen.

Here’s the solution. Instead of dragging your mouse over repeatedly desperately trying to find your objects just do this…. Press control/command + A. That will select all of your objects on the stage. Second, zoom in by pressing control/command + “+”. Now you’re back in business staring at your stage objects and it’s all centered.

That’s it. Again nothing special or ground breaking but very helpful.

5 Tips for new Flash Developers

flashdevelopers

When I graduated college two years ago I thought I had all the tools I needed to build flash sites. One lesson that I quickly learned is that I was wrong. I’m glad to have had my teachers and they did prepare me for life after graduation, but I didn’t realize how much more learning I had to go through. Two years later I feel like I’ve learned a lot and grown as a Flash Developer, but I still have a long way to go. What I do want to hopefully pass on to other new Flash Developers are some of the tips and lessons that I have learned. Hopefully this will help you avoid a few headaches and late nights of development. Read the rest of this entry »

Motion Tweens in Flash CS4

Flash CS4

I’ve been lucky enough to work with Flash CS4 and while it does come with it’s share of bugs I wouldn’t go back to Flash CS3. One of the improvements that I love is the new tweening engine. If anything it makes animating in Flash 10x more enjoyable. The update borrows a lot of features from After Effects and brings with it a whole new way of thinking when you animate in the IDE. So, to help myself and other people get used to the new engine I’m listing a little link roundup that not only talks about the new changes but also shows some examples of what you can do.

Animation Learning Guide for Flash CS4

Motion Migration Guide for Flash CS4

The new way of tweening of Flash CS4

Lists of keyboard modifiers in the Flash CS4 motion model

I’ve also included a zip file of a ton of examples. I didn’t make these but I did find it at adobe’s site.

http://download.macromedia.com/pub/developer/motion-is-awesomer.zip

Finally, here are a few other miscillaneous links from a feature tour of CS4 and some basics of animatin. Nothing big but it’s always good to brush up on the basics even if it’s for a reminder lesson.

Lee Brimlow’s Tour of Flash CS4

Principles of Animation

About Me

My name is Richard Perez and I am an alumni of Rochester Institute of Technology. This is my personal blog where I like to post about anything that insterests me. Which can range from design, programming, family, and tech gadgets. Currently, I work at HZDG in New York City as an Interactive Flash Developer. I love design and combining that with flash makes my day ten times better.

Categories

Calendar

September 2010
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
27282930