Build 10 classic Flash games and learn game development along the way with this ultra-fast paced game development course.

If you love this blog, this is the book for you.

Buy the book

Get the source code of 12 commercial Flash games, which have been loaded more than 50 million times!

Learn from real world successful examples.

Get it now

Box2D for Flash Games teaches you how to make Flash physics games from scratch with the most advanced features.

Create the new Flash game smashing hit.

Buy the book

An one-button way to control the player coming from the past

I always loved one-button games. First, they can be played with just one button. Second, in the mobile game era, it’s easy to port an on-button concept to an one-tap concept.

Almost five years ago (ages!!) I showed a strange way to move the player with Flash made with AS2, and I find it interesting to port it to AS3, to be ported again in other languages.

Since you can find the complete theory in the original post, I will just post the AS3 source code:

and this is the result:

Press and keep the mouse pressed to move the ball with a given direction and speed

During next days I’ll port this prototype into the most famous formats.

Download the source code

Rate this post: 1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)
Loading ... Loading ...
Flash Templates provided by Template Monster are pre-made web design products developed using Flash technology.
They can be easily customized to meet the unique requirements of your project.
Be my fan on Facebook and follow me on Twitter! Exclusive content for my Facebook fans and Twitter followers

This post has 6 comments

  1. Georgiou Georgios

    on April 26, 2012 at 6:17 pm

    Hi Emanuele,

    Thanx for the free code. Unfortunatelly does not works on Flash CS4. I hope to produce it for other versions of Flash.

  2. lbineau

    on April 27, 2012 at 12:44 am

    Hi,
    I’ve done a quick version with Haxe NME
    HTML5 : http://dl.dropbox.com/u/5239872/one_button/bin/html5/bin/index.html
    AS3 : http://dl.dropbox.com/u/5239872/one_button/bin/flash/bin/onebutton.swf
    But you can target Android or iOS with the same source code !(http://dl.dropbox.com/u/5239872/one_button/one_button.zip) :-)

  3. egdcltd

    on April 27, 2012 at 12:09 pm

    A bit off topic I know, but what plugin are you using to display the code in your posts?

  4. jujuwiwi

    on May 11, 2012 at 2:16 am

    @egdcltd : have a look to the source. It’s wp_syntax for wordpress : http://wordpress.org/extend/plugins/wp-syntax/

  5. egdcltd

    on May 18, 2012 at 10:47 am

    Thanks jujuwiwi, I did look at the source but I must have missed that.

  6. Jack

    on June 6, 2012 at 2:53 am

    So would it be fine if i were to implement this into a game for the iOS platform? Or were you planning on actually using it?