<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
/**
* Demonstration of Turtle graphics using mxml and actionscript with Flex 3
*
* Generate 4 simple graphic images using Turtle Graphics
* For reference see Harold Abelson and Andrea diSessa's book "Turtle geometry".
*
* Mike Axelrod - 2/11/2008 - http://www.mikeaxelrod.com/
*
*/
import turtle.*;
private var S:Square = new Square(150); private var T:Triangles = new Triangles(200); private var K:Snowflake = new Snowflake(20, 3); private var Sp:Spiral = new Spiral(120); ]]>
</mx:Script>
<mx:Panel x="10" y="10" width="528" height="560" layout="absolute" title="Turtles!" >
<mx:Canvas x="22" y="20" width="231" height="195" id="myCanvas1" creationComplete="S.Render(myCanvas1.graphics)">
</mx:Canvas>
<mx:Canvas x="273" y="20" width="204" height="195" id="myCanvas2" creationComplete="T.Render(myCanvas2.graphics)">
</mx:Canvas>
<mx:Canvas x="22" y="271" width="231" height="206" id="myCanvas3" creationComplete="K.Render(myCanvas3.graphics)">
</mx:Canvas>
<mx:Canvas x="273" y="234" width="204" height="192" id="myCanvas4" creationComplete="Sp.Render(myCanvas4)">
</mx:Canvas>
</mx:Panel>
</mx:Application>