Posted in September 2008

Protip – Making an email forward look like it was sent for the first time

by

Has this ever happened to you?

You’re having an awesome birthday bash and you send out an email to all your closest friends… that is, all your closest friends except ‘Ed’. Now you’re faced with the embarrassing situation of having to invite your friend Ed post-invitum. But don’t fret, here’s a simple solution that will save you loads of embarrassment!

Go from Go from this... to ...to this!

Step 1. Find the original email

Did you send a copy to yourself? Good! If not, check your sent folder. Not there? Ask your mom to forward the invite back to you.

Step 2. Forward to yourself and BCC your friend.

Click on the forward button. This time send it to yourself! In the BCC field put the name of the person (or people) you forgot. BCC stands for “blind carbon copy” and the names on this list won’t be listed so they’ll ony see your name listed.

Step 3. Delete “fwd:” from the subject line.

That’s a dead giveaway that you’re a loser and a fuck-up who doesn’t care about his friends.

Step 4. Remove the quote formatting.

You know the blue line that runs down the left side of the text that you’re forwarding? That’s the quote formatting. It may also appear as a “>” or some other symbol. Taking that stuff out is the last step in making your email look fresh.

If you’re using Mac Mail, just highlight the quoted text and press Command + Option + ‘ (apostrophe) until the blue line disappears.

Also make sure you remove the text that says “Begin forwarded message:”! Duh!

Step 5. Make sure it looks right and send!

If done properly, your email will look exactly like a brand new email and your friend will never know that you don’t really like them that much!

IRL Update – Mims H. Wright is moving to LA

by

After six years in Brooklyn, New York, Mims H. Wright, awesome Flash developer, is moving to Los Angeles, California where he will continue doing what he did before only this time with more sunshine. Moving day is 9/26… if you’re free that day, maybe you can help pack the truck. He will dearly miss New York, it’s inhabitants, and not-driving.

If you’re a resident of sunny L.A., drop me a line! Let’s be pals.

Discussion: How best to benchmark Flash?

by

While checking out Grant Skinner’s new tweening engine, gTween, I was bothered by one small phrase…

gTween is a small (4.5kb), fast (1500 instances, 0.5s duration, ~25fps), instance based tweening class, with a huge number of options and capabilities.

The definition of ‘fast’ in terms of Flash Player performance is somewhat of a mystery. We’re looking for high frame rate i guess? Lots of things on stage? Total time of operations? But frame rate and number of instances don’t really tell the whole story. There are a number of factors that make the Flash Player performance a very difficult thing to measure.

  • Flash Player performance varies based on the speed of the viewer’s computer.

That’s nothing new. All apps deal with this. However, Flash Player has these added complications.

  • Flash Player performance varies based on what version of the player is being used.
  • Flash Player performance varies based on the browser in which it is embedded.
  • The browsers’ Flash Player runs at a different speed as desktop versions (browsers seem to have a speed cap around 50 or 60 fps while stand alone versions do not)
  • Loading times for external assets must sometimes be taken into account.
  • Framerates can vary based on the set framerate of the Flash app. Rumored ‘magic framerates’ may affect this as well.
  • Flash Player can sometimes hang, crash, or self-destruct if too many processes are going on at once.
  • Flash Player 10′s support for video hardware should complicate things further (although it will probably make our lives easier in the long run).
The results of our latest benchmark

The results of our latest benchmark

Continue reading

Tagged , , , , ,

Accessing named MovieClips placed on the stage in Flash CS3 while staying true to OOP best-practices

by

Each developer has a favourite IDE that he or she swears by. I’m an Eclipse man myself. However, during a project I worked on recently, I had the misfortune of diving back into development using Flash CS3, a tool that, despite it’s widespread use, I have managed to mostly stay away from since it’s release. Why? Flash CS3 is a BAD tool for ActionScript development*. Needless to say I was a bit rusty with the Flash authoring tool, but I was nonetheless determined to create a nice, clean, object-oriented, design-patterny product.

*Perhaps I shall elaborate on this statement in a later post

The first thing I did was create some MovieClip symbols. I created, for example, a custom button containing a background (to which i gave the instance name “bg”) and a text field (called “label”). I then opened the properties for this button and included a path to a class (com.foo.MyButton) that would be associated with the symbol. In the class, I declared the two child MovieClips as variables like so.

package com.foo {
   import flash.display.*;
   import flash.text.*;
   class MyButton extends MovieClip {
      public var bg:Sprite;
      public var label:TextField;
   }
}

However, when I ran this code it seemed to choke on the two variable declarations.

Error 1151: Has this ever happened to you? How embarrassing!

Error 1151: Has this ever happened to you? How embarrassing!

I was stumped. Was Flash CS3 actually unable to deal with this situation? Many people I asked seemed to think so. Eventually, I talked to someone who knew the solution.

Sarah Plowright of ActionScriptGirl.com had this advice:

Remember how if you place a MovieClip on the stage or in another MovieClip in an AS2 project you had to also declare a variable of the same name if you’re using a custom class? Well, in Flash CS3 / AS3, Adobe has decided to give us developers some options. The only problem is, they didn’t exactly make these options obvious to the user. If you didn’t know about this change, you  be getting all sorts of nasty errors and wondering why you ever decided to build that project using Flash instead of Flex.

If you’re getting errors along the lines of "1151: A conflict exists with definition myMC in namespace internal." and you’re working custom classes attached to library objects with instances, the error is probably caused by the fact that you have “Automatically declare stage instances” checked. This checkbox is located under Publish Settings > Flash > ActionScript 3.0 Settings. If it’s checked, Flash will automatically add variables to your class at compile time. If you already have tried to declare a variable in your class for this instance, the compiler will throw error 1151, as you will now have two declarations of the same variable. If it’s unchecked, you will have to declare a public variable for every onstage instance that you want access to in ActionScript. Remember, you must make your instance declarations public, or they won’t work!

Make sure that "Automatically Declare Stage Instances" is unchecked.

Make sure that "Automatically declare stage instances" is unchecked.

The fix is easy, simply decide whether or not you want Flash to create your variable names for you. I personally prefer to declare my own stage instances as I believe it’s a better practice to have all your variables listed at the top of a class, but annoyingly, this means I will have to uncheck the “Automatically declare stage instances” checkbox for every new FLA file. Unfortunately, this option only seems to be available under publish settings, and not available under the global application preferences.

Here are some sample files that show’s how this all works.

accessingMovieClipsExample

I happen to agree with Sarah that the best way to work is to uncheck the checkbox and declare all of your variables yourself. This is the only way that really enforces good practices when you are using classes behind your MovieClips in the library.

Thanks for the help, Sarah!