score:1

Accepted answer

The script tag needs to go in the SVG file (game.svg) and not in the html file. Note that SVG script tags use xlink:href instead of src as the attribute that holds the script source.

 <script xlink:href="game.js"></script>

You should also change onload="top.load(evt)" to just onload="load(evt)" in the root <svg> element.

And your third and main issue is that you have a function zoom() and a variable called zoom on line 114. Remove the variable as it isnt used and the zoom method will get called.


Related Query