Bookmark Bookmark Bookmark Bookmark Bookmark Bookmark Bookmark My Bookmark - Become a Fan on Facebook!

LorenzGames, All about Flash Games!

Follow me on Twitter! Follow Me on Twitter

How to smooth Dynamic Text with special fonts

August 13th, 2010 - Category: ActionScript 3, Developers, Flash
Sometimes it happens that we want to use a particular font in a Dynamic Text, but then when we render it we notice that the font is not smooth enough, it actually is kinda sharp and ugly to see.

To solve this problem it is necessary to embed the font in the library.
First thing to do is Right Click on the library in Flash and add "New Font...".
Then we have to choose our font, give it a name and export it for ActionScript, like this:

Flash add font

[...] Click here to read more...


Read 3 comments - Write a comment

Save a PNG image directly from client side using Flash Player 10

April 26th, 2010 - Category: ActionScript 3, Flash
Flash Player 10 has a great feature, that maybe not everybody uses or knows... the possibility to save files directly from client side, without using any PHP!

This is great! Particularly useful to save images. Imagine you are doing a game where you want to allow your player to take a snapshot of what is on screen, now you can!

I am going to show you how to make this, but first of all you have to download this PNG Encoder.
This was created by Tinic Uro but I am actually using a fixed version by 5etdemi which is faster.

This example below draws everithing it finds on the stage in a BitmapData and saves it in a PNG file:[...] Click here to read more...


Read 1 comments - Write a comment

Sexual messages in game advertising

April 20th, 2010 - Category: Advertising, General, Publishers
Lately I have been attracted by some advertising banners on Google Ads.
They all had one thing in common... boobs!

Funny thing is that they are not at all considered sexy ads, infact they all advertise video games.

The Evony ads are the ones with the most interesting evolution, they passed from a knight to boobs like it was a normal thing to do. Studing their evolution is clear that they gained benefits from it, otherwise why misslead people to something totally different from what you are advertising?

Attracting people with sexual images is not as new as somebody can think.
Walt Disney has done it many times, using either boobs and phallic symbols.

In very old advertising it is funny to search for this subliminal messages.

Subliminal messages are not directly understandable, but at a subconcious level our brain decodes those images as something interesting.

I have collected few game advertising, all images taken from Google Ads, so of course none of those advertise any kind of sexual contents.[...] Click here to read more...


Read 1 comments - Write a comment

Pro and Cons of building a game using Flex instead of Flash

April 16th, 2010 - Category: ActionScript 3, Developers, Flash, Flex
After a discussion on the forum of MochiAds I decided to summ up all the things we said about using Flash IDE or Flex to make a game.

One important thing that came up since the first moment is that you can develop with FlashDevlop using Flex for free, instead of paying up to $700 to buy a license of Flash.
Using FlashDevelop to code is much easier due to the code predictor, you just start to write something and the program finishes it.

In terms of code editing Flash is really bad, so Flashdevelop or Flex itself is better.The Flex framework for example is useful to build menus very quickly.

Flash allows the creation of vector graphics, animations, and movie clips right away and pretty fast, also it makes possilbe to code directly on the timeline, which sometimes is very useful.

In Flex SDK you are almost restricted to using sprites and make all your graphics with PNG and then generate animations with tweener, this process would be too long to be considered fun.

Flash and Flex

[...] Click here to read more...



Read 1 comments - Write a comment

How to rotate many MovieClips on the same external point using Matrix in AS3

April 12th, 2010 - Category: ActionScript 3, Developers, Flash
In the past days I explained 2 other ways to rotate display objects on a different registration point, here and here.
This one is the third, and maybe last way to make it.

We will use Matrix for this, it is a little bit more code to write, but the result is the best you can get.
This way you can create an array of objects you want to rotate around a point, also you need to create an array of matrix transforms every time you start the rotation, this way you wont have any error.

In this exampe I have 5 objects (a,b,c,d,e), and i want to rotate all of them on the given point p.[...] Click here to read more...


Read 1 comments - Write a comment

How to change the selection color in a TextField with AS3

April 11th, 2010 - Category: ActionScript 3, Developers, Flash
If you have ever tried to select text from a Dynamic or Input TextField, you would have noticed that on a black background you can not see it.

This is because the color of the selection is always black, so it totally blends with the background and there is no internal property to change that color.

But there is an handy class to achieve this:



[...] Click here to read more...


Read 1 comments - Write a comment

A plan to fight back the new Apple developer agreement

April 10th, 2010 - Category: General
Lately we have seen so much buzz around the new Apple developer agreement.
To resume that, they basically said applications must be originally written in Objective-C, C, C++, or JavaScript to be accepted on the AppStore.

iphone unlock

This of course keeps our beloved Flash CS5 iPhone packager out of the party.
Now, more than a war against Adobe seems to be a marketing strategy, they are not stupid, they know that with the new Flash tool they will see thousands of apps overcrowding the AppStore, and biggest problem, developer will be able to make cross platform version of the same game for any other marketplace, choosing different prices.

That for them must have been like a nightmare, imagine an Android with the same games of an iPhone but at a lower price!!! AAAAAAAAAAH!!! VADE RETRO SATANA![...] Click here to read more...


Read 1 comments - Write a comment

How to compress a text in AS3 with Base64

April 8th, 2010 - Category: ActionScript 3, Developers, Flash
This can be very useful if you have a long string or text that you want to compress and then be able to put in a database or, for example, if you have a game with a level editor and you want to allow people to share levels with a code that you provide, hiding the actual variables you are using in that code and at the same time compressing it.

I have used it for one of my project and it is actually pretty handy and fast.
The class to use is the Base64, created by Subhero.[...] Click here to read more...


Read 2 comments - Write a comment

Where to find good Music and SoundFX for your games

April 7th, 2010 - Category: Developers, Sounds
On Internet there are many ways to find music and sounds for your game.
I am going to suggest you few sites that I think are interesting, but first of all take always in count that the more music and sounds you add the more your game size will increase.

Because of this it is always better to find loopable music not longer than enough... for example you should get a 10-15 seconds loop for the menu and a longer loop, 50 to 70 seconds for the game.

It is usually better to choose WAV files because they can be compressed from a good starting point, sometimes MP3 are already compressed too low. About compression is important to change something in File->Publish Settings..., just make sure you set everything to the right Bit rate, for me the right compromise is a 64 kbps stereo, compressed at best quality, but I suggest you to tweak it and test to see if you like any other setting, just don't go to low or the music will sound very choppy.

Flash sound settings

Good sound and music can only compliment your game, pushing it to the next level of polish. The issue is that a game that isn't very fun will not become more fun with great sound considerations (unless the game itself is based completely around the music and sound).[...] Click here to read more...


Read 2 comments - Write a comment

How to embed Japanese font in a TextField

April 6th, 2010 - Category: ActionScript 3, Developers, Flash
Let's say you have some japanese characters in a TextField and you want to give it a nice embedded look, so that the font looks antialised and better looking.

You have 2 options, first easy one, just click on "Character Embedding..." and select "Japanese(ALL)".
The problem with this one is that if you have a lot of textfields you will have to do it manually with the risk that you can forget about one of them and also let's say one day you decide you want to change the font of the text fileds you will have to do it again manually.

There is another way that I am actually using ritght now, basically[...] Click here to read more...


Read 1 comments - Write a comment