What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
“Syntax error” means you typed it wrong.
“Expecting rightparen before colon” either means that a right parenthesis is missing, or that you added a colon in the wrong place.
Look at the lines 47 and 61 to to see which it is.
Check out this thread – it will stop the forum from mangling your code and make it much easier for everyone to help you.
I believe your problem is on this line
Your replayGame function expects a mouse event. If you want to call that function without an event, there are a few different ways of doing that. I would suggest providing a default value in the function, like so:
function replayGame(e:MouseEvent = null):void
Then you can call that function with a mouseEvent, or without one by using the code
Put all the initialisation scripting into a function (actually it’s a procedure but AS uses the word ‘function’ for both), then you can call that from replayGame to get things back to the initial state.