Archive for November, 2009

How to Use Layers to Organize a Flash Project

Organization is of the utmost importance when creating your Flash project. Keeping your project clean and easy to access will make it much easier in the long run; especially when creating games or animations that are heavy on the ActionScript.

While it may seem possible to put everything on one layer while using a single scene without any objects in the library, it is generally not a good idea. Layers allow the developer / animator to easily monitor what is visible on the scene. Provide your layers with unique names that can easily be identified and your brain will thank you. You never know if there will be a time that you wish to come back and change a part of that layer.

The topmost layer in your environment should be your Actions layer, and all of your code should go there. You can also create folders that contain groupings of specific layers, but this may not be necessary unless your environment contains dozens of layers, which is not out of the ordinary at all.

Labels can be placed on specific frames, which can then be used by ActionScript to jump around your project. Rather than using gotoAndStop(20) to get to frame 20, try placing a label on the frame and jumping to the label instead. This will save you time in the event that you wish to add more frames to the project, as you will not have to go back into your ActionScript and change that hard-coded number.

Layers are an important component of keeping your Flash project clean and organized. Don’t think that putting everything on the same layer is taking the easy way out, as you may still run into trouble during the course of your project and end up learning this important lesson the hard way.

How do Keywords Impact SERPs

When someone executes a Google search, every word in their query acts as a keyword. When Google decides on the results of that search, keywords act as an important modifier for your website’s ranking; in fact, they are possibly the single-greatest factor in determining where you will rank among others.

PageRank is also an important factor, but realize that PageRank is more general. If your website is about flowers, there is no reason why it should place on top of the SERPs (Search Engine Results Pages) for the search query boats. I consider PageRank to be a multiplier-factor; having a high PageRank will boost the relevance of your website for searches containing your keywords, but you must have the keywords to even qualify.

Let’s go a bit deeper. So what if you do want your website to start competing for the keyword boats, even though your website is about flowers? Simple. Every time the word “boats” is found on your website, Google will take note of that, and increase the relevance of that keyword for your website. Thus, it is extremely easy to gain keywords, but it takes time.

So now that you have written about boats multiple times on your website, you now have some relevance with that keyword. The next time someone searches Google for “flowers and boats”, your website will come out on top. Great job! But how often will it be that someone searches Google for such a random phrase like that? Probably not very often, which brings me to my next point; it is generally a good idea to keep your website on topic.

Take this website for instance. The majority of content here relates to Computer Science. Zoom in a little bit, and the majority of my Computer Science content is about web design. When I make a blog post, I make sure that it relates to Computer Science in some way. Yes, that gives me a lot of things to write about, but I wouldn’t dare writing about flowers; I can’t have it all. When deciding what type of content you want on your website, try to choose a broad topic. For instance, if you want to make a website about flowers, but also want to have the possibility to write about boats, you can think of your website as being under the outdoors category. Now you have given yourself boundaries, and that makes it much easier to decide on what you can and cannot write about.

This is the number one reason why most blogs fail. People tend to write about whatever comes to mind. If I decided to write about random topics, I would have WAY more keywords than I do now, but all of my keywords would have low relevance. Start out small, and slowly expand. If I was to write an article about candy, Google would never dream of putting me on the top of the results for a keyword that I only used once.

If you are a webmaster that hasn’t yet signed up for Google Webmaster Tools, do so now. They provide you with information about your top 200 keywords, and the top search queries for your website, along with many other useful tools. Check this out:

My Top 20 KeywordsWhile I do get to see my top 200 keywords, right now the relevancy on most of them is rather low. This website of mine is still rather new, and doesn’t yet have a whole lot of content. Leave a comment and share yours for comparison; I’d really like to see what the keywords page looks like for a larger website.

I check Google Webmaster Tools on a daily basis, watching as my keywords get shaped up. Being a webmaster is a full time job if you plan on competing for the top SERPs, but it’s also a lot of fun.

My Journey as a Webmaster (Part Three)

[ Part One ] [ Part Two ] [ Part Three ]

The Birth of NFreak.net

For quite some time things were going great; better than I ever could have imagined. Traffic to my website was constantly on the rise, and I had even developed a small user base of my own; people who would come to my website on a daily basis to socialize. Little did I know that struggles were on the horizon.

The three gigabytes of bandwidth that I was allowed each month started to develop into a huge issue. The first time that it maxed out, people were prevented from coming to my website for almost a full week. This was extremely stressful, as I wanted to ensure that everyone would continue to return, and taking someone away from something for a full week can make them lose interest. Not only that, but I also didn’t want the potential of my website to be limited by bandwidth issues.

But alas, so came the first of the month and I was back in business. I became more and more alert of my precious bandwidth, and I was able to estimate what day of the month that it would go down. This process continued for about two more months before my birthday rolled around along with a new web host and a domain name of my choice. Coincidence? I think not.

I chose the name NFreak.net because NFreak (as in Nintendo Freak) was my nickname on the Nintendo Forums. I kept this new website a secret while I spent the next week or so moving everything to the new web host and making myself a legitimate template. I now had 20 gigabytes of bandwidth per month; about seven times more than I did before.

The website had a great launch, and within weeks I had more than doubled my traffic. Once things had settled down, I went back and consulted with my friend PHP and decided that my top posters list desperately needed an upgrade. I stepped it up a notch, and implemented a cron job that went off every eight hours to update the post counts. There was also a second cron job that triggered once daily and created a separate list for the top posters of that specific day. This little perk allowed for people to see exactly how many posts they made that day, along with their position relative to others. More importantly, it finally gave me a break from manually performing this task everyday, which consumed a good fifteen minutes on average. [ Part four is coming soon. ]

[ Part One ] [ Part Two ] [ Part Three ]

Introducing Planet Yook

As I’ve stated in the past, a new Flash-based role-playing game is in the works. The title of this game was originally going to be Space Raiders, but I decided to get creative as it was important for me to have a matching .com domain name associated with it. Thus, Planet Yook was born alongside www.PlanetYook.com.

I will keep the website constantly updated with the latest version of the .swf file, and once I feel that the game is worth launching, I’ll build a template and some content-related pages to go alongside. Currently, all that I have done is created a pre-loader, while my fiance has designed the logo and is helping to create most of the objects that will go with the game.

This is going to be a long term project, as my ActionScript 3.0 knowledge is limited, and it’s important that I do everything right the first time. As a result, I’ve spent more time actually researching and planning this game than coding it. So why do I bother announcing a game that doesn’t have anything but a fancy loading bar?

If you haven’t noticed, many of the recent articles that I’ve been posting have been about Flash / ActionScript, and I figured that if I could just let the bird out of the cage, I would be able to openly share my progress on this title while receiving feedback along the way. I can’t even begin to schedule a tentative release date at this time, but be sure to check out www.PlanetYook.com every so often if you’re interested in the latest build. I’m not going to be posting an article every step of the way, but I will keep you updated with milestones that have been reached. The next time I write an article on Planet Yook will most likely be after registration and login are complete, for example.

Comment, subscribe, and come back soon!

Font Types and File Size in Flash

When you are adding new text fields to your Flash project, be aware that they can have a large impact on your file size. If you look in your output report, you’ll soon realize that you may be adding 100 kilobytes (or more) to the published file size by adding a simple text field that’s only a few words in length. Why does this occur?

Let’s say you decided that you wanted to create a text field with the words “Hello, World” using the Calibri font face, which is Microsoft Word’s default font type since Vista’s release. Flash will take precautions when publishing your .swf file, as not all computers have this font available. Each unique letter that is used will be bundled into your file, and a dramatic increase in file size will result.

Creating another text field using a combination of these same letters will not do any extra damage unless you decided to use another font type that isn’t a standard device font. Flash includes three generic device fonts for you to use that will not affect the file size in such a dramatic way: (1) _sans is similar to either Arial or Helvetica, (2) _serif is much like Times New Roman, and (3) _typewriter would be your fixed-width Courier.

There is also another option you have to avoid this daunting effect on file size. Let’s say you wanted to use Calibri without taking up 100 kilobytes of space. When you have your text object selected, go to the Anti-Alias option in the character section of the properties panel. If you choose to select “Use Device Fonts”, you can still use your font of choice without all the extra bundled letters into your published file. Here’s the catch; if the person viewing your Flash file does not happen to have that font on their computer, Flash will attempt to find a similar font that does match, and use that instead.

It is a good idea to give your text fields an extra buffer in size just in case that happens. Instead of making the text object’s width match the width of the text in the field, maybe add a few more characters worth of space to prevent your text box from hiding characters from people who may not have that font installed. For the majority of font types, it will not be an issue, but there is always the off chance that someone will view your .swf without that font, and Flash will incorporate another font that causes the field to grow. You wouldn’t want the text to grow beyond the length of your box. Get the picture?