Yeah good point James. Though I am not asking for code, just direction from those with experience. Guess trying to re-write a game in a day at the same time as trying to learn a new subject is a bit ambitious. I had pretty much finished the game but the code is just one huge class, and all the pseudo 3D movement is totally fudged as the graphics (fish eyed view) do not help with coding 3D movement. Anyway I decided to start again from scratch and try and do it in a more organised manner.
Here is the version of the game that I had nearly completed. Lots of bugs but you will get the idea.... http://www.mediakitchen.co.uk/rugby_game15.html The 3D effect of moving down the pitch was done by just scaling the background / pitch image with values that I got by trial and error and its just not good enough to polish things off. Hence I am trying to recreate the pitch entirely with code http://www.mediakitchen.co.uk/move_pitch.html Then I will add a camera. http://www.mediakitchen.co.uk/scaling_camera.html Anyway as I said, this all has to be completed today which is why I cheekily asked for some direction. I will probably just do the sounds the way I previously done them for now and research this at a later date. Ok time to create the 3D game environment.... Cheers Paul -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Marsden Sent: 05 November 2006 12:47 To: Flashcoders mailing list Subject: Re: [Flashcoders] OOP advice for game - use of sound effects Hey Paul, You're spoiling the fun for yourself by asking how to do this stuff ;) Work it out, and be proud of it..! J Paul Steven wrote: > Another aspect of the game I need to deal with is the sound effects. > > Previously to play sounds in my games I simply imported the sound files into > the library, gave them a linkage name them put the following code on the > first frame of my movie for each sound effect. > > cheer_Sound = new Sound(); > cheer_Sound.attachSound("cheer_sfx"); > > Play_Cheer_Sound = function() { > cheer_Sound.start(); > } > > As I am using this game as a learning exercise to write a game using OOP, I > wondered if there is a better way to deal with all the sound effects. > Basically there are about 12 different sound effects, and I basically just > need to be able to make a call to play a particular sfx when required. The > various objects need to be able to call the sfx. For example the > WeatherManager class may want to play a wind sfx when the wind speed changes > to a higher speed. > > Is this something I should write a separate class for or is the above the > way to do it still? > > Many thanks > > Paul > > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com