View Full Version : Duck Hunt Game! Adding extras!
soccerdude28
January 18th, 2008, 10:56 PM
Thx
parkerdc
January 19th, 2008, 06:24 AM
Hey Now!
Downloaded your fla and came up with...
duckID = setInterval(BonusDuck,30*1000,getTimer()+5*1000);
BonusDuck = function(stay_on_seconds){
//make duck fly around.
if (getTimer() > stay_on_seconds){
// this will stop the BonusDuck (clear timer)
clearInterval(duckID);
// this will reset the timer and wait
// 30 seconds and run again
duckID = setInterval(BonusDuck,30*1000,getTimer()+5*1000);
}
}
You will need to add following code outside of the function ONCE to make it work.
duckID = setInterval(BonusDuck,30*1000,getTimer()+5*1000);
To stop the bonus duck from going on forever, you will need to clear it.
You would use the following code in gameover, pause, etc.
clearInterval(duckID);
soccerdude28
January 20th, 2008, 11:37 PM
Thx!
parkerdc
January 21st, 2008, 04:38 AM
Hey, I have fixed up the problems on your game.
- Added new graphics with alpha channel, resized them.
- Removed old graphics/movies not needed anymore.
- Fixed your code and removed code not needed.
- Tried to stream line the way it operated, meaning have the main code all in one area.
- The scope still has code attached to it.
- The first frame has all the working code for the duck and the bonus duck.
I spent hours trying to figure out why it would not work and noticed the document was Flash 6. Not sure if that was a mistake, but what I told you will not work for Flash 6.
Anyways, I am posting a completed version in Flash 8.
http://www.serendip.org/RealDuckHunt2.zip
soccerdude28
January 21st, 2008, 09:04 AM
Thx
parkerdc
January 21st, 2008, 11:09 AM
I have converted the flash 8, to flash 6.
http://www.serendip.org/RealDuckHunt3.zip
Blabbo
January 23rd, 2008, 10:34 PM
its not cool to delete all your posts, they could've helped others with similar problems
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.