I'm trying to create a program and found this website that was exactly what I wanted. When I followed all the instructions I got this java code which makes no sense and also gives errors when I try to assign a class. Please help.


<script type="text/javascript" src="js/mootools-1.2-core-nc.js">
<script type="text/javascript" src="js/mootools-1.2-more.js">
<script type="text/javascript" src="js/excanvas.js"></script>
<script type="text/javascript" src="js/moocirclepack.js"></script>
var circles = [
                new Circle(10, 10, 50, "rgba(120, 80, 120, 0.75)"),
                new Circle(20, 25, 20, "rgba(174, 175, 76, 0.75)"),
                new Circle(30, 40, 70, "rgba(88, 88, 120, 0.75)"),
                new Circle(65, 65, 10, "rgba(205, 55, 140, 0.75)")
<canvas id="canvasElement" width="500" height="500"></canvas>

var packer = new MooCirclePack(circles, "canvasElement")
6 Years
Discussion Span
Last Post by Taywin

Moving to JS.

Sorry about that I thought I put it in Javascript. Thank you for Moving it Ezzaral.


Look at what js libraries the page is included...

<script type="text/javascript" src="js/mootools-1.2-core-nc.js"></script>
<script type="text/javascript" src="js/mootools-1.2-more.js"></script>
<script type="text/javascript" src="js/excanvas.js"></script>
<script type="text/javascript" src="js/moocirclepack.js"></script>

Do you have all of those library files (.js) in your "js" folder where the HTML file is located? If not, you won't be able to display it.

Edited by Taywin: n/a


So what errors have you gotten?

By the way, if you just want a display circle, you could give wz_jsgraphics library a try (by Walterzon). Though, only German website version is still alive (http://www.walterzorn.de). Other sites (English version) are gone. I've been using this library all the time for drawing line/polygon/filled-polygon.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.