• Home
tudwaythecore.com
blog
  • Recent Posts

    • Detecting focus in flash player
    • BitmapData PerlinNoise
    • Creating bridges in APE part 2
    • Creating bridges in APE
    • SteerWheels 2
    • Creating a simple APE example
    • Design me some levels!
    • Finished Migrating
  • Recent Comments

    • random on Making a Shooting Game Part 2
    • SammyG on Making a Shooting Game Part 2
    • Jim on Making a Shooting Game Part 2
    • rraven on Making a Shooting Game Part 2
    • Adrian on Making a Shooting Game Part 2
  • Categories

    • APE
    • flash
    • game
    • platform
    • sound
    • tutorial
    • Uncategorized
  • Archives

    • May 2009
    • October 2008
    • September 2008
    • August 2008
    • May 2008
    • April 2008
    • March 2008
  •  

    May 2012
    M T W T F S S
    « May    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • games

    • Game Showcase
Aug 24

Updating the site

flash, game No Comments »

Due to an increase in traffic i have moved my site tudway-experimental.com over to this new site, i am also using wordpress instead of iweb. Over the next few days i will move all of the content from the old site to this new one. So stay tuned!

May 19

SteerWheels

flash, game 2 Comments »

Here is my new game SteerWheels!
You can play it here
It is a fun, interesting physics based game where you have to push the ball to the bar using the car (controlled by the arrow keys).

I created it back in february, but i acquired sponsorship for this game so me and my sponsor, GamesReloaded.com, spent the rest of the time tweaking it so that it was as perfect as could be managed.
It was made using CS3 (obviously) and APE, which is an open source flash physics engine. which is free and really easy to pick up. I will make a tutorial on the basics later.
This was also an experiment to see if i could make some money on a flash game. i have deduced that you can make anything from a really small amount to a massive sum.
One last thing for you to look at.
SteerWheels Stats!
These are the mochibot stats for SteerWheels and they are updated daily, so you can see how many websites and views the game has got. Even though it says the game has been out for 90 odd days, it has actually only been out for 7 days, So these stats are quite impressive (i think).
Feel free to comment!
Apr 09

Sound in flash cs3 part 2 – pause

flash, sound 5 Comments »

Ok, starting off with an example, heres an example where it loops infinitely and you are able to pause and resume it.

The code hasn’t changed much but there are some subtle differences that have a lot of effect on the outcome.
When the pause button is pressed a new variable is set which tells the play button where to replay the sound from. Lets look at the code.

import flash.media.Sound;
var sound:Sound = new acoust();
var channel:SoundChannel;
var soundisplaying:Boolean = false;
var pausePosition:int = 0
playbut.addEventListener(MouseEvent.CLICK, playsound);
stopbut.addEventListener(MouseEvent.CLICK, stopsound);
function playsound(event:Event):void {
if (soundisplaying==false) {
channel = sound.play(pausePosition);
soundisplaying = true;

channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
}
}
function stopsound(event:Event):void {
pausePosition = channel.position;
channel.stop();
soundisplaying =false;
}
function soundComplete(event:Event):void {
channel = sound.play();
channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
}
Ok, the new pause position variable is the first new thing, it is set at 0 when the movie starts, this is the start of the sound.
The next change is within the soundplay function. Where instead of the channel = sound.play(0, 99) with channel.play(pausePosition), so to recap, this is to play the sound from pauseposition, which i set earlier.
Next i add the event listener for when the sound finishes, so i can loop it. ( i can’t loop it the way i did last time as this interferes with the pause function)
The next change is the most important one, where i update the pausePosition when the stopbut button is pressed. This sets the place from which you can resume the play back when you press play.
The last thing i changed was to make a function which loops the music, it literally checks to see if the sound has finished and then replays the sound if it is.
Ok thats the basic sound tutorials over.
Previous Entries Next Entries
Powered by WordPress .::. Designed by SiteGround Web Hosting

cssandhtml