{"id":3508,"date":"2016-02-12T18:25:53","date_gmt":"2016-02-13T01:25:53","guid":{"rendered":"http:\/\/www.nathalielawhead.com\/candybox\/?p=3508"},"modified":"2016-02-12T18:25:53","modified_gmt":"2016-02-13T01:25:53","slug":"tutorial-making-a-frog-generator-with-adobe-animate-html5-createjs","status":"publish","type":"post","link":"http:\/\/www.nathalielawhead.com\/candybox\/tutorial-making-a-frog-generator-with-adobe-animate-html5-createjs","title":{"rendered":"Tutorial: Making a Frog Generator with Adobe Animate (HTML5 &#038; CreateJS)"},"content":{"rendered":"<p>You can VIEW the end result here: <a href=\"http:\/\/frogs.alienmelon.com\/html5\/\" target=\"_blank\">http:\/\/frogs.alienmelon.com\/html5\/<\/a><br \/>\nYou can DOWNLOAD the sourcefiles here: <a href=\"http:\/\/nathalielawhead.com\/sourcefiles\/Weird_Alien_Frogs\/\" target=\"_blank\">http:\/\/nathalielawhead.com\/sourcefiles\/Weird_Alien_Frogs\/<\/a><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/download-1.png\" alt=\"\" \/><\/p>\n<p>This tutorial will walk you through using Animate to make a procedural frog generator. It will cover all the basics of using the HTML5 Canvas output, as well as timeline scripting for the functionality.<\/p>\n<p>For those that are interested I also have a tutorial for making a game with CreateJS + <a href=\"http:\/\/www.nathalielawhead.com\/candybox\/tutorial-building-a-game-with-flash-html5-canvas-createjs-haxatron-2000\" target=\"_blank\">the canvas in Flash\/Animate here<\/a>.<br \/>\nIt&#8217;s a bit older, and some of the issues (and resulting workarounds) I mention there no longer apply. Although the tutorial itself is still fairly relevant.<\/p>\n<p>It&#8217;s also interesting to note that it&#8217;s easy to run into minor weird bugs or issues working with the canvas. I do frequently. While creating the tutorial I ran into one &#8220;hard to explain one&#8221;.<br \/>\nAlso, there are some things this doesn&#8217;t support that makes using this for games difficult. For example, at the moment InputText is not supported. Working with (fancier fontier) text can be very hard. Selectable text isn&#8217;t supported either. The filters (like glow, etc) aren&#8217;t supported&#8230; These are things that keep me up at night. Hoping&#8230; Waiting&#8230;<br \/>\nThen again, for a while .width &#038; .height where not supported which made collision detection (and other things) hard. Now there&#8217;s getBounds() and getTransformedBounds(), and setBounds(), or object.nominalBounds.width. Good things come to those that wait&#8230; but you know&#8230; it&#8217;s good to keep in mind that there&#8217;s always a workaround.<\/p>\n<p>Moving on&#8230;<\/p>\n<p>This tutorial is based on my <a href=\"http:\/\/frogs.alienmelon.com\" target=\"_blank\">original frog generator<\/a>. The original was ActionScript based, but I ported it to HTML5 Canvas (createJS) so I can write a fun tutorial about generating frogs with something javascript! Yay!<br \/>\nI also figure a Javascript tutorial is probably more interesting to people.<br \/>\nI&#8217;m under the impression that ActionScript programmers do not need tutorials because they already know what they are doing.<\/p>\n<p>Also, on the note of frog generating tutorials, G.P. Lackey gave a pretty kick ass presentation where he built a frog generator with Construct 2. <a href=\"https:\/\/www.youtube.com\/watch?v=VuCT9Rccy08&#038;list=PLB0aFSDY8m29hfux0K8tiSeQL0ekEQ_ke&#038;index=27\" target=\"_blank\">Video is here<\/a>. It&#8217;s also something you can follow along to make your own frog generator. His end result is playable here. <a href=\"http:\/\/mousefountain.itch.io\/fantastic-frogs-forever\" target=\"_blank\">http:\/\/mousefountain.itch.io\/fantastic-frogs-forever<\/a><\/p>\n<p>Ok. Let&#8217;s begin&#8230;<\/p>\n<p>&#8212;<\/p>\n<p><strong>PAGE SETUP<\/strong><\/p>\n<p>Like I said&#8230; This will be using timeline scripting. Timeline scripting is usually looked down on, and controversial among self-respecting programmers. I&#8217;m neither of these things and think it&#8217;s one of the greatest things that ever happened. So I use timeline scripting.<\/p>\n<p>Add a top layer called &#8220;JS&#8221;. Keep this layer at the top, and only scripts go here.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/timeline.png\" alt=\"\" \/><\/p>\n<p>In the first frame add the following page setup:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/PAGE SETUP\/\/<\/span>\r\n\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> page_body <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">document<\/span>.getElementsByTagName(<span style=\"background-color: #fff0f0\">&quot;body&quot;<\/span>)[<span style=\"color: #0000DD; font-weight: bold\">0<\/span>];\r\npage_body.style.backgroundColor <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;black&quot;<\/span>;\r\npage_body.style.overflow <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;hidden&quot;<\/span>;<span style=\"color: #888888\">\/\/hide scrollbars<\/span>\r\npage_body.style.position <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;fixed&quot;<\/span>;<span style=\"color: #888888\">\/\/no scroll. ever.<\/span>\r\n<span style=\"color: #888888\">\/\/<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> page_canvas <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">document<\/span>.getElementsByTagName(<span style=\"background-color: #fff0f0\">&quot;canvas&quot;<\/span>)[<span style=\"color: #0000DD; font-weight: bold\">0<\/span>];\r\n<span style=\"color: #888888\">\/\/these two variables are important<\/span>\r\nstageWidth <span style=\"color: #333333\">=<\/span> page_canvas.width;\r\nstageHeight <span style=\"color: #333333\">=<\/span> page_canvas.height;\r\n<span style=\"color: #888888\">\/\/<\/span>\r\n<span style=\"color: #007020\">document<\/span>.documentElement.style.cursor <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&#39;url(&quot;images\/CURSOR_FROG_3.gif&quot;), auto&#39;<\/span>;\r\n<span style=\"color: #888888\">\/\/<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> onResize()\r\n{\r\n\tstage.width <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">window<\/span>.innerWidth;\r\n\tstage.height <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">window<\/span>.innerHeight;\r\n\tpage_canvas.style.height <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">window<\/span>.innerHeight <span style=\"color: #333333\">+<\/span> <span style=\"background-color: #fff0f0\">&quot;px&quot;<\/span>;\r\n\tpage_canvas.style.width <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">window<\/span>.innerWidth <span style=\"color: #333333\">+<\/span> <span style=\"background-color: #fff0f0\">&quot;px&quot;<\/span>;\r\n}\r\n<span style=\"color: #888888\">\/\/<\/span>\r\n<span style=\"color: #007020\">window<\/span>.onresize <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>()\r\n{\r\n     onResize();\r\n}\r\n<span style=\"color: #888888\">\/\/<\/span>\r\nonResize();\r\n<\/pre>\n<\/div>\n<p>Of course you could add this to the HTML page in a script tag, or in a separate js file, or however you want it. I add it like this because it&#8217;s convenient.<\/p>\n<p>Basically, it makes the canvas\/stage stretch to fit the window (so it&#8217;s sort of fullscreen). There are a lot of ways of sizing the canvas to fit the screen. You can also keep it proportionate, but I like it this way. However you prefer.<\/p>\n<p>It also changes the mouse cursor to Kermit, because Kermit is a pretty awesome frog. So this is fitting.<\/p>\n<p>&#8212;<\/p>\n<p><strong>SOUNDS<\/strong><\/p>\n<p>Sounds that you want to play\/stop have to be loaded in first. As far as I know (and from last time I checked) linkage identifiers don&#8217;t work (loading in from the library).<br \/>\nI cover sounds very extensively in this tutorial: <a href=\"http:\/\/www.nathalielawhead.com\/candybox\/tutorial-building-a-game-with-flash-html5-canvas-createjs-haxatron-2000\" target=\"_blank\">http:\/\/www.nathalielawhead.com\/candybox\/tutorial-building-a-game-with-flash-html5-canvas-createjs-haxatron-2000<\/a><br \/>\nso there is no need to repeat myself.<\/p>\n<p>The code is as follows&#8230;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/REFERENCES (GLOBAL)\/\/<\/span>\r\n\r\n_stage <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">this<\/span>;<span style=\"color: #888888\">\/\/stage<\/span>\r\n<span style=\"color: #888888\">\/\/save width\/height<\/span>\r\n_stage.width <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">1366<\/span>;\r\n_stage.height <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">768<\/span>;\r\n\r\n<span style=\"color: #888888\">\/\/AUDIO\/\/<\/span>\r\n\r\n<span style=\"color: #888888\">\/\/http:\/\/createjs.com\/docs\/soundjs\/classes\/Sound.html<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> assetsPath <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;sounds\/&quot;<\/span>;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> snd_manifest <span style=\"color: #333333\">=<\/span> [\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_title_start&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_START.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_title_credits&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_CREDITS.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_transition&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_TRANSITION_01.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_evnt01&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_EVNT01.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_evnt02&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_EVNT02.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_evnt03&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_EVNT03.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_evnt04&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_EVNT04.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_evnt05&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_EVNT05.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_mountains&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_SCENE_MOUNTAIN.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_stream&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_SCENE_STREAM.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_space&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_SCENE_SPACE.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_frog01&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_LOOP_FROG01.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_frog02&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_LOOP_FROG02.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_frog03&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_LOOP_FROG03.mp3&quot;<\/span>},\r\n\t{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_camera&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_CAMERASHUTTER01.mp3&quot;<\/span>}\r\n];\r\n\t\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> queue <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">new<\/span> createjs.LoadQueue(<span style=\"color: #008800; font-weight: bold\">true<\/span>, assetsPath);\r\n<span style=\"color: #888888\">\/\/See: http:\/\/www.createjs.com\/Docs\/SoundJS\/classes\/Sound.html#property_alternateExtensions<\/span>\r\ncreatejs.Sound.alternateExtensions <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;mp3&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;wav&quot;<\/span>];\r\nqueue.installPlugin(createjs.Sound);\r\n<span style=\"color: #888888\">\/\/load is complete, and the other to display the load progress<\/span>\r\nqueue.addEventListener(<span style=\"background-color: #fff0f0\">&quot;complete&quot;<\/span>, handleComplete);\r\nqueue.addEventListener(<span style=\"background-color: #fff0f0\">&quot;progress&quot;<\/span>,handleProgress);\r\n<span style=\"color: #888888\">\/\/load manifest is to load multiple sounds\/a set of them<\/span>\r\nqueue.loadManifest(snd_manifest);\r\n<span style=\"color: #888888\">\/\/to load an individual file:<\/span>\r\n<span style=\"color: #888888\">\/\/queue.loadFile({id:&quot;snd_title_start&quot;, src:&quot;AUD_START.mp3&quot;});<\/span>\r\n\t\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> handleComplete(evt) {\r\n\tconsole.log(<span style=\"background-color: #fff0f0\">&quot;all sounds loaded.&quot;<\/span>);\r\n\tplaySound(<span style=\"background-color: #fff0f0\">&quot;snd_title_start&quot;<\/span>);\r\n\t_stage.gotoAndStop(<span style=\"background-color: #fff0f0\">&quot;mainmenu&quot;<\/span>);\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> handleProgress(evt) {\r\n\t<span style=\"color: #888888\">\/\/console.log(&quot;Event Loading: &quot; + (queue.progress.toFixed(2) * 100) + &quot;%&quot;);<\/span>\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/manage playing and stopping of sounds<\/span>\r\n<span style=\"color: #888888\">\/\/to play a sound pass it the string name<\/span>\r\nplaySound <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(name) {\r\n\t<span style=\"color: #008800; font-weight: bold\">return<\/span> createjs.Sound.play(name);\r\n}\r\nplaySoundLoop <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(name, loops){\r\n\t<span style=\"color: #008800; font-weight: bold\">return<\/span> createjs.Sound.play(name, {loop<span style=\"color: #333333\">:<\/span>loops});\r\n};\r\n<span style=\"color: #888888\">\/\/play a random sound from one of the arrays<\/span>\r\nplayArrSound <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(arr){\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_element <span style=\"color: #333333\">=<\/span> arr[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>];\r\n\t<span style=\"color: #008800; font-weight: bold\">return<\/span> createjs.Sound.play(arr_element);\r\n}\r\nstopSound <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(name){\r\n\t<span style=\"color: #008800; font-weight: bold\">return<\/span> createjs.Sound.stop(name);\r\n}\r\nstopAllSounds <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(){\r\n\tcreatejs.Sound.stop();\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/sound arrays<\/span>\r\n<span style=\"color: #888888\">\/\/for randomly playing a sound<\/span>\r\narr_snd_events <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;snd_evnt01&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;snd_evnt02&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;snd_evnt03&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;snd_evnt04&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;snd_evnt05&quot;<\/span>];\r\n<span style=\"color: #888888\">\/\/frog &#39;singing&#39;<\/span>\r\narr_frog_sound <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;snd_frog01&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;snd_frog02&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;snd_frog03&quot;<\/span>];\r\n\r\n<span style=\"color: #888888\">\/\/various event functions (random sounds)<\/span>\r\n<span style=\"color: #888888\">\/\/on key down, and other<\/span>\r\nplayEvntSound <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(){\r\n\tplayArrSound(arr_snd_events);\r\n}\r\n<\/pre>\n<\/div>\n<p>So you see they are queued, and there are two formats I offer (mp3 or wav).<br \/>\nThere are a bunch of functions for controlling audio. These should be pretty self-explanatory, and cover all cases.<br \/>\nTo play one you call the function and pass it the name (as a string).<br \/>\nSounds that I want to play at random are kept in an array, and the <code>playArrSound<\/code> function handles that playback.<\/p>\n<p>Once loading is completed, we proceed to the &#8220;mainmenu&#8221; and play the Main Menu music (<code>\"snd_title_start\"<\/code>)&#8230;<\/p>\n<p>&#8212;<\/p>\n<p><strong>INPUT TEXT<\/strong><\/p>\n<p>Like I said, there are some things createjs (Animate&#8217;s HTML5 canvas output) doesn&#8217;t support that really starts to get hard if you&#8217;re making games. In this case input text is not supported.<\/p>\n<p>I mean, yes it sort of is, but not really. You <a href=\"http:\/\/www.w3schools.com\/jsref\/dom_obj_text.asp\" target=\"_blank\">have to add a DOM element<\/a> if you want real input text. I don&#8217;t like that. It gets messy really fast, especially if you want to use your own fonts.<\/p>\n<p>For the sake of this tutorial I&#8217;ll try to do something different while using what is supported.<\/p>\n<p>I&#8217;ll capture keypresses (<code>document.onkeydown = event_keydown<\/code>) and <code>+=<\/code> them to the dynamic text field. Some basic logic is there. It will allow for deleting, and adding new characters. This is enough for me.<\/p>\n<p>The name of the dynamic &#8220;input&#8221; text field is &#8220;<code>txt_namefield<\/code>&#8220;.<\/p>\n<p>This is what we will use:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\">str_startmsg <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;START TYPING YOUR NAME&quot;<\/span>;\r\nstr_name <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;&quot;<\/span>;<span style=\"color: #888888\">\/\/the frogname (yourname)<\/span>\r\n\r\n<span style=\"color: #888888\">\/\/keyboard<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> setKeyboard(){\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t<span style=\"color: #007020\">document<\/span>.onkeydown <span style=\"color: #333333\">=<\/span> event_keydown;\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n};\r\n<\/pre>\n<\/div>\n<p>The actual event looks like this. The comments should be pretty self explanatory&#8230;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008800; font-weight: bold\">function<\/span> event_keydown(e){\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(<span style=\"color: #333333\">!<\/span>e){ <span style=\"color: #008800; font-weight: bold\">var<\/span> e <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">window<\/span>.event; }\r\n\t<span style=\"color: #888888\">\/\/get the charcdoe<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_char <span style=\"color: #333333\">=<\/span> e.keyCode;\r\n\tconsole.log(num_char);\r\n\t<span style=\"color: #888888\">\/\/get the letter<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> str_letter <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">String<\/span>.fromCharCode(e.keyCode);\r\n\t<span style=\"color: #888888\">\/\/regex to allow only for letters (no numbers or puncuation)<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> regex_letters <span style=\"color: #333333\">=<\/span> <span style=\"color: #000000; background-color: #fff0ff\">\/^[A-Za-z\\s]+$\/<\/span>; <span style=\"color: #888888\">\/\/ \/^[A-Za-z\\s]*$\/;<\/span>\r\n\t<span style=\"color: #888888\">\/\/clear text field if nothing entered yet<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(_stage.txt_namefield.text <span style=\"color: #333333\">==<\/span> str_startmsg){\r\n\t\t_stage.txt_namefield.text <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;&quot;<\/span>;\r\n\t}\r\n\t<span style=\"color: #888888\">\/\/if &quot;enter&quot; is hit (same as selecting manually)<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(num_char <span style=\"color: #333333\">==<\/span> <span style=\"color: #0000DD; font-weight: bold\">13<\/span> <span style=\"color: #333333\">&amp;&amp;<\/span> _stage.txt_namefield.text.length <span style=\"color: #333333\">&gt;<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span> <span style=\"color: #333333\">&amp;&amp;<\/span> _stage.txt_namefield.text <span style=\"color: #333333\">!=<\/span> str_startmsg){\r\n\t\tmainmenu_refresh();\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span> <span style=\"color: #008800; font-weight: bold\">if<\/span>(num_char <span style=\"color: #333333\">==<\/span> <span style=\"color: #0000DD; font-weight: bold\">8<\/span> <span style=\"color: #333333\">||<\/span> num_char <span style=\"color: #333333\">==<\/span> <span style=\"color: #0000DD; font-weight: bold\">46<\/span>){\r\n\t\t<span style=\"color: #888888\">\/\/if backspace or delete<\/span>\r\n\t\t<span style=\"color: #888888\">\/\/trim off the last character<\/span>\r\n\t\t<span style=\"color: #888888\">\/\/start with saving the contents of the text field into a string<\/span>\r\n\t\t<span style=\"color: #008800; font-weight: bold\">var<\/span> str_textfield <span style=\"color: #333333\">=<\/span> _stage.txt_namefield.text;\r\n\t\t<span style=\"color: #888888\">\/\/now trim it<\/span>\r\n\t\tstr_textfield <span style=\"color: #333333\">=<\/span> str_textfield.substring(<span style=\"color: #0000DD; font-weight: bold\">0<\/span>, str_textfield.length <span style=\"color: #333333\">-<\/span> <span style=\"color: #0000DD; font-weight: bold\">1<\/span>);\r\n\t\t<span style=\"color: #888888\">\/\/set the text field to the new value<\/span>\r\n\t\t_stage.txt_namefield.text <span style=\"color: #333333\">=<\/span> str_textfield;\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span> <span style=\"color: #008800; font-weight: bold\">if<\/span>(_stage.txt_namefield.text.length <span style=\"color: #333333\">&lt;<\/span> <span style=\"color: #0000DD; font-weight: bold\">25<\/span> <span style=\"color: #333333\">&amp;&amp;<\/span> str_letter.match(regex_letters)){\r\n\t\t<span style=\"color: #888888\">\/\/if not backspace or delete<\/span>\r\n\t\t<span style=\"color: #888888\">\/\/and if only letter (no numbers or punctuation)<\/span>\r\n\t\t<span style=\"color: #888888\">\/\/and if under 25 characters long<\/span>\r\n\t\t<span style=\"color: #888888\">\/\/populate text field with:<\/span>\r\n\t\t_stage.txt_namefield.text <span style=\"color: #333333\">+=<\/span> str_letter;\r\n\t\tstr_yourname <span style=\"color: #333333\">=<\/span> _stage.txt_namefield.text;\r\n\t};\r\n\t<span style=\"color: #888888\">\/\/show or hide btn_refresh (if text is actually input, and not the default string)<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(_stage.txt_namefield.text.length <span style=\"color: #333333\">&gt;<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span> <span style=\"color: #333333\">&amp;&amp;<\/span> _stage.txt_namefield.text <span style=\"color: #333333\">!=<\/span> str_startmsg){\r\n\t\t_stage.btn_refresh.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span>{\r\n\t\t_stage.btn_refresh.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n\t}\r\n\t<span style=\"color: #888888\">\/\/play event sound (frog ribbit)<\/span>\r\n\tplayEvntSound();\r\n}\r\n<\/pre>\n<\/div>\n<p>The variables at the top get the keycode and the letter from that keycode.<br \/>\nThe regular expression makes sure you can only enter letters. Numbers and punctuation is not allowed. I apologize if you have a fancy name.<br \/>\nThe first condition is just so we can get rid of the <code>\"START TYPING YOUR NAME\"<\/code> text. The only downside of this is if there is a person who is actually named &#8220;START TYPING YOUR NAME&#8221;, but I doubt it.<br \/>\nThe second condition takes care of text input. Enter key takes precedence (same as selecting the &#8220;start button&#8221; manually), then deleting and backspace, and then whatever is entered (with the condition of under 25 and regex_letters).<br \/>\nAlso make sure to show or hide the button that generates the frog. This button is what makes the magic happen. Alternatively you can just press ENTER to make the magic happen. All cases are covered.<br \/>\nPlay ribbit sound!<\/p>\n<p>Also, for those who are interested. A couple useful links for understanding js char codes and keys:<br \/>\n<a href=\"http:\/\/www.cambiaresearch.com\/articles\/15\/javascript-char-codes-key-codes\" target=\"_blank\">http:\/\/www.cambiaresearch.com\/articles\/15\/javascript-char-codes-key-codes<\/a><br \/>\n<a href=\"http:\/\/www.quirksmode.org\/js\/keys.html\" target=\"_blank\">http:\/\/www.quirksmode.org\/js\/keys.html<\/a><\/p>\n<p>That&#8217;s it!<\/p>\n<p>The biggest downside of this is that it will not work on mobile. If we where so inclined we could create an alternative for these users, but for the sake of simplicity we&#8217;ll leave that for later. Some other time.<\/p>\n<p>Minor issue here is that you can&#8217;t select (to edit) wherever you want in the text field. I mean, if you worked on it you could probably get it to work. It doesn&#8217;t really mater to me. It&#8217;s probably a good idea that they don&#8217;t put in long names anyway. :)<\/p>\n<p>&#8212;<\/p>\n<p><strong>MAIN MENU<\/strong><\/p>\n<p>The &#8220;main menu&#8221; is really simple. It&#8217;s basically just the title with giant rotating lines (like light rays), to give it a little motion.<\/p>\n<p>There&#8217;s a credits screen. The visibility of it is set to false, unless you click the &#8220;credits&#8221; button to see it.<br \/>\nTo read more about buttons I suggest checking this out: <a href=\"http:\/\/www.createjs.com\/docs\/easeljs\/classes\/ButtonHelper.html\" target=\"_blank\">http:\/\/www.createjs.com\/docs\/easeljs\/classes\/ButtonHelper.html<\/a><br \/>\nYou may also find this helpful: <a href=\"http:\/\/www.createjs.com\/tutorials\/Mouse%20Interaction\/\" target=\"_blank\">http:\/\/www.createjs.com\/tutorials\/Mouse%20Interaction\/<\/a><br \/>\nYou could use the <code>ButtonHelper<\/code> Class to take care of over, out, etc&#8230; but (for convenience sake) I just &#8220;create new symbol&#8221; of type Button.<\/p>\n<p>Here you will also put in your name so it can be turned into a frog, and you can meet your frogself. I covered this functionality above.<\/p>\n<p>Also there are two transitions (on their own &#8220;Transitions&#8221;) layer. These provide a little &#8220;flashy&#8221; animation for transitioning to the next area (like game, or opening the credits screen). A small audio &#8220;hit&#8221; plays for the larger one.<br \/>\nThe &#8220;flashy&#8221; colors here are a series of frames. The playhead is sent to a random frame for the funky flashy static effect.<\/p>\n<p>Like so:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\">gotoAndStopRandom <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(clip){\r\n\tclip.gotoAndStop(<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>clip.timeline.duration));\r\n};\r\ngotoAndPlayRandom <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(clip){\r\n\tclip.gotoAndPlay(<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>clip.timeline.duration));\r\n};\r\n<\/pre>\n<\/div>\n<p>To play the transition you would call the following function<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/Transitions<\/span>\r\n<span style=\"color: #888888\">\/\/play transitions   <\/span>\r\nplay_transition <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(clip){\r\n\t<span style=\"color: #888888\">\/\/chan_title.stop();<\/span>\r\n\tclip.gotoAndPlay(<span style=\"color: #0000DD; font-weight: bold\">2<\/span>);\r\n}\r\n<\/pre>\n<\/div>\n<p>There is one difficult thing working with the HTML5 Canvas Document you will encounter often&#8230; make sure to keep scope in mind when referencing things.<br \/>\nLocal scope isn&#8217;t implicit in HTML canvas timelines. You have to be explicit.<\/p>\n<p>For example JUST calling <code>stop();<\/code> to stop your animation will not work because that&#8217;s the global scope (same as saying <code>window.stop();<\/code>)<br \/>\n<code>this.stop();<\/code> will work. That&#8217;s the current timeline.<\/p>\n<p>It&#8217;s probably a good idea to save a reference to your &#8220;stage&#8221; by using something like (on a separate &#8220;JS&#8221; layer):<\/p>\n<p><code>_stage = this;\/\/stage<\/code><\/p>\n<p>Then always reference <code>_stage.whatever<\/code> to get access to anything on the stage.<\/p>\n<p>You may already know this, but&#8230;<\/p>\n<p>If you want to make symbols (Buttons, MovieClips, Sprites) on your stage accessible to code be sure to always assign it a name in the Properties panel. Like so:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/properties_name.png\" alt=\"\" \/><\/p>\n<p>Then to access it you can &#8220;<code>_stage.mc_title...<\/code>&#8221;<\/p>\n<p>So, what we will have in the main menu is:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/UNIVERAL (GLOBAL)\/\/<\/span>\r\n\r\n<span style=\"color: #888888\">\/\/Timelines<\/span>\r\ngotoAndStopRandom <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(clip){\r\n\tclip.gotoAndStop(<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>clip.timeline.duration));\r\n};\r\ngotoAndPlayRandom <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(clip){\r\n\tclip.gotoAndPlay(<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>clip.timeline.duration));\r\n};\r\n\r\n<span style=\"color: #888888\">\/\/Transitions<\/span>\r\n<span style=\"color: #888888\">\/\/play transitions   <\/span>\r\nplay_transition <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(clip){\r\n\tstopAllSounds();\r\n\tclip.gotoAndPlay(<span style=\"color: #0000DD; font-weight: bold\">2<\/span>);\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/MENU SETUP\/\/<\/span>\r\n\r\n<span style=\"color: #888888\">\/\/strings<\/span>\r\n\r\nstr_startmsg <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;START TYPING YOUR NAME&quot;<\/span>;\r\nstr_yourname <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;&quot;<\/span>;<span style=\"color: #888888\">\/\/your name before frogification<\/span>\r\nstr_name <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;&quot;<\/span>;<span style=\"color: #888888\">\/\/the name for frogification<\/span>\r\n<\/pre>\n<\/div>\n<p>These are the more &#8220;global&#8221; functions and setup. The strings you know from the textfield + keyboard input part.<br \/>\nThe transition function is important.<\/p>\n<p>Then there is:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/width &amp; height of things that are hard to get the width\/height for<\/span>\r\n\r\n_stage.txt_namefield.width <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">1146<\/span>;\r\n_stage.txt_namefield.height <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">42<\/span>;\r\n\r\n<span style=\"color: #888888\">\/\/seting up clips<\/span>\r\n\r\nset_small_ribbon <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(){\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t_stage.mc_ribbon.gotoAndStop(<span style=\"background-color: #fff0f0\">&quot;small&quot;<\/span>);\r\n\t_stage.mc_ribbon.x <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(_stage.width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>);\r\n\t_stage.txt_namefield.x <span style=\"color: #333333\">=<\/span> (_stage.mc_ribbon.x<span style=\"color: #333333\">-<\/span>_stage.mc_ribbon.nominalBounds.width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">+<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>) <span style=\"color: #333333\">+<\/span> _stage.txt_namefield.width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>;\r\n}\r\n\r\nset_large_ribbon <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(){\r\n\t_stage.mc_ribbon.gotoAndStop(<span style=\"background-color: #fff0f0\">&quot;large&quot;<\/span>);\r\n\t_stage.mc_ribbon.x <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(_stage.width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>);\r\n\t_stage.txt_namefield.x <span style=\"color: #333333\">=<\/span> (_stage.mc_ribbon.x<span style=\"color: #333333\">-<\/span>_stage.mc_ribbon.nominalBounds.width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">+<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>) <span style=\"color: #333333\">+<\/span> _stage.txt_namefield.width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>;\r\n\t_stage.txt_namefield.y <span style=\"color: #333333\">=<\/span> <span style=\"color: #6600EE; font-weight: bold\">518.9<\/span>;\r\n\t_stage.mc_ribbon.y <span style=\"color: #333333\">=<\/span> <span style=\"color: #6600EE; font-weight: bold\">513.2<\/span>;\r\n\t_stage.mc_ribbon.x <span style=\"color: #333333\">=<\/span> <span style=\"color: #6600EE; font-weight: bold\">682.85<\/span>;\r\n\t_stage.btn_refresh.x <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">1214<\/span>;\r\n\t_stage.btn_refresh.y <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">505<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<p>I &#8220;record&#8221; the width\/height of text fields because that&#8217;s sort of harder to get.<br \/>\nThe ribbons (that&#8217;s the backdrop to the text) gets moved up and down a lot. So that&#8217;s here too.<br \/>\nThe UI generally will get shuffled around a lot for all the different states. For example, when you take a picture of your frog, the UI changes to make that look nicer.<\/p>\n<p>After that we have our keyboard input portion (above), and then this final bit:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/credits<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> event_credits_open(event){\r\n\tstopSound(<span style=\"background-color: #fff0f0\">&quot;snd_title_start&quot;<\/span>);\r\n\tplaySound(<span style=\"background-color: #fff0f0\">&quot;snd_title_credits&quot;<\/span>);\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tplay_transition(_stage.mc_transition_bottom);\r\n\tplay_transition(_stage.mc_transition_top);\r\n\t_stage.mc_credits.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> event_credits_close(event){\r\n\tstopSound(<span style=\"background-color: #fff0f0\">&quot;snd_title_credits&quot;<\/span>);\r\n\tplaySound(<span style=\"background-color: #fff0f0\">&quot;snd_title_start&quot;<\/span>);\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tplay_transition(_stage.mc_transition_bottom);\r\n\tplay_transition(_stage.mc_transition_top);\r\n\t_stage.mc_credits.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n}\r\n<span style=\"color: #888888\">\/\/credits (url)<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> event_credits_twitter(event){\r\n\t<span style=\"color: #007020\">window<\/span>.open(<span style=\"background-color: #fff0f0\">&quot;http:\/\/twitter.com\/alienmelon&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;_blank&quot;<\/span>);\r\n}\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> event_credits_moreabout(event){\r\n\t<span style=\"color: #007020\">window<\/span>.open(<span style=\"background-color: #fff0f0\">&quot;http:\/\/www.allaboutfrogs.org\/weird\/weird.html&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;_blank&quot;<\/span>);\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/function for &quot;refresh&quot;, enter key and refresh button use this<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> mainmenu_refresh(){\r\n\tevent_clearmenu();\r\n\tstopSound(<span style=\"background-color: #fff0f0\">&quot;snd_title_credits&quot;<\/span>);\r\n\tstopSound(<span style=\"background-color: #fff0f0\">&quot;snd_title_start&quot;<\/span>);\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tplay_transition(_stage.mc_transition_bottom);\r\n\tplay_transition(_stage.mc_transition_top);\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t_stage.gotoAndPlay(<span style=\"background-color: #fff0f0\">&quot;froggen&quot;<\/span>);\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/go to the froggen screen (start)<\/span>\r\n<span style=\"color: #888888\">\/\/clear everything, stop everything, and play the transition<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> event_mainmenu_refresh(event){\r\n\tmainmenu_refresh();\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/clear everything (all events)<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> event_clearmenu(){\r\n\t_stage.btn_credits.removeEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_open);\r\n\t_stage.mc_credits.btn_close.removeEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_close);\r\n\t_stage.mc_credits.btn_link01.removeEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_twitter);\r\n\t_stage.mc_credits.btn_link02.removeEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_moreabout);\r\n\t_stage.btn_refresh.removeEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_mainmenu_refresh);\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t<span style=\"color: #007020\">document<\/span>.onkeydown <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">null<\/span>;\r\n}\r\n \r\n<span style=\"color: #888888\">\/\/add events<\/span>\r\nsetKeyboard();\r\n_stage.btn_credits.addEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_open);\r\n_stage.mc_credits.btn_close.addEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_close);\r\n_stage.mc_credits.btn_link01.addEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_twitter);\r\n_stage.mc_credits.btn_link02.addEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_credits_moreabout);\r\n_stage.btn_refresh.addEventListener(<span style=\"background-color: #fff0f0\">&quot;click&quot;<\/span>, event_mainmenu_refresh);\r\n<span style=\"color: #888888\">\/\/setup clips<\/span>\r\nset_small_ribbon();\r\n_stage.txt_namefield.text <span style=\"color: #333333\">=<\/span> str_startmsg;\r\n<span style=\"color: #888888\">\/\/<\/span>\r\n_stage.mc_credits.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n_stage.mc_ui_back.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n_stage.btn_save.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n_stage.btn_refresh.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n<\/pre>\n<\/div>\n<p>These are the various button events, and menu setup.<br \/>\nThe comments should make this pretty self explanatory.<\/p>\n<p>Simple! That&#8217;s all there is to the menu.<\/p>\n<p>Now for the actual frog generator&#8230;<\/p>\n<p>&#8212;<\/p>\n<p><strong>THE GENERATOR<\/strong><\/p>\n<p>We&#8217;ll begin with the frogification of the name entered.<br \/>\nThe idea of this generator is that you enter your name, and it generates a frog. This is your frogself. You get to know yourself if you where a frog.<\/p>\n<p>Make sure that &#8220;Multiframe bounds&#8221; is selected in the Publish Settings. That&#8217;s under the Advanced tab.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/bounds.png\" alt=\"\" \/><\/p>\n<p>Reason is probably given here: <a href=\"http:\/\/blog.createjs.com\/update-width-height-in-easeljs\/#comment-798\" target=\"_blank\">http:\/\/blog.createjs.com\/update-width-height-in-easeljs\/#comment-798<\/a><br \/>\nYou can&#8217;t just check against .width or .height. You have to be more specific. In this case we&#8217;ll be doing a lot of <code>mc_body.frameBounds[mc_body.currentFrame].height<\/code> or <code>clip.getTransformedBounds().width<\/code> and the like&#8230; I&#8217;m very certain that there&#8217;s a better way of doing it. Sorry. This is how I did it.<br \/>\nTo make life easier it&#8217;s in a function that returns:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008800; font-weight: bold\">function<\/span> return_bounds(clip){\r\n\t<span style=\"color: #888888\">\/\/return clip.frameBounds[clip.currentFrame]; \/\/you can do this<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">return<\/span> clip.getTransformedBounds(); <span style=\"color: #888888\">\/\/or this<\/span>\r\n}\r\n<\/pre>\n<\/div>\n<p>and then use it like so:<\/p>\n<p><code>return_bounds(mc_body).height<\/code> or <code>return_bounds(mc_body).width<\/code><\/p>\n<p>You can read more about this here: <a href=\"http:\/\/blog.createjs.com\/update-width-height-in-easeljs\/\" target=\"_blank\">http:\/\/blog.createjs.com\/update-width-height-in-easeljs\/<\/a><\/p>\n<p>For starters we will turn the name entered into a frog version, and provide a little description of the personality.<br \/>\nIt&#8217;s random, and takes place by splicing, slicing, and looping, and a bunch of arrays with tons of stuff randomly combined.<\/p>\n<p>The arrays&#8230;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/description (about your frog)<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> adj_aka <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;The humans call you&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Also commonly known as&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Also known as&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Often referred to as&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Someone once called you&quot;<\/span>];\r\n\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> adj_very <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;very&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;quite&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;fully&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;perfectly&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;really&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;thoroughly&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;totally&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;truly&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;rather&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_personality <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;an adventurous&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;one &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; cool&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a kick-ass&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; small but formidable&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; formidable&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot; a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; calm&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a composed&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a calm and &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; composed&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; rowdy, and unruly&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; great&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; busy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; successful&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; fortunate&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;an outstanding&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a strong and stout&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; stout&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; strong&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a frog ahead of its game at being a&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; lucky&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an all in all&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an extraordinary&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a notable&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an undefeated&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an undefeated frog at being a&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a reigning&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a champion&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a boss&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a choice&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a top-notch&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a world class&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; distinguished&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an outstanding&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a prime&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a superior&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; audacious&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; bold&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; courageous&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a risk-taker&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an enterprising&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a daredevil&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a critically acclaimed&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a distinguished frog at being a&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; distinguished&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an eminent&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an esteemed&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a famed&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a notable&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a reputable&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; loved&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a beloved&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an admired&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; popular&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an adventurous&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; audacious&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a gallant&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a gusty&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; heroic&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a resolute&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a spirited&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; stout&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; forward thinking&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; chivalrous&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a gritty&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an unblenching&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a formidable&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a redoubtable&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a daunted&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a frog aghast at all that is&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; alarmed&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; anxious&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a suspicious&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; timid&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an easily frightened&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a frog in awe at all that is&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a nervous&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; perplexed&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a perturbed&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an easily startled&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an artistic&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; creative&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; dramatic&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; musical&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; idealistic&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; harmonious&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a &quot;<\/span><span style=\"color: #333333\">+<\/span>adj_very[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_very.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; rhythmical&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a sensitive&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a stylish&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a tasteful&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an extravagant&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an ample&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a decided&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a strong-minded&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a responsible&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an honest&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a positive&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an adaptable&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a self-driven&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a self-motivated&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a patient&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;a kind&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;an all around good&quot;<\/span>];\r\n<span style=\"color: #888888\">\/\/<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_01 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;, and have so many of them&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;, and have such a large family&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;, and love your family&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;, and love everything about everyone&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_02 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You just escaped after being held captive in an aquarium for years&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. No one can capture you&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. It&#39;s so warm and titillating here, you love everyone&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_03 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Your genus has settled all the difficult places&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re proud to be part of such a widespread species&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You fear nothing, not even the dog&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_04 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;, even if you&#39;re the last of your kind after a city grew over your natural habitat&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You just know everything will work out, even if your natural habitat is disappearing&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Your self esteem is a force to be reckoned with&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_05 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. If you where human you know you would rule the world as an ungainly frogtyrant&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You have better things to do than to be boring&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You have a punchline for every predator, even your mom&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_06 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. All frogs can count on you, you are the frogcount&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;ve waited days for that bug to crawl out of its hole&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You can literally wait all winter for a ray of sunshine&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_07 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;... although everyone knows you&#39;re cold-blooded, duh&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... although frogs are cold-blooded, duh&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. If you had fur you would be a cuddle cat&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_08 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Once you put your mind to something you never change it&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Sometimes you like to sit in something that&#39;s too hot just to see how long you can do it&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Sometimes you like to sit in hot water just to test yourself&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_09 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You know what&#39;s good. That&#39;s good. Yes&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You like to play it safe and that&#39;s smart&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You rather do the eating than to be eaten&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_10 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. There&#39;s no climate too harsh for you&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. What some call climate change you call a nice challenge. Yes&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Your genus evolves gracefully&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_11 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You love to sing and keep everyone awake&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You once kept an entire neighborhood awake with your musical talents&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You like to sit in high places and make noise&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_12 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You love the sound of your own croaks&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You love to listen to the sounds you make&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re pretty certain that if you spoke english humans would call the sound of your voice poetry&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_13 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You just escaped after being held captive in an aquarium for years&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Nothing can stop you, not even that cat&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re never too old, especially with a face like that&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_14 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You have all the answers to all the questions&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. If you where a human you would be the ungainly frogdictator of the world&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re pretty sure you&#39;re a smart frog no matter what the stinky humans say&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_15 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;re not afraid to show your soft side, which is everywhere&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;ve got a squishy center and just as squishy skin&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re pretty soft, all over&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_16 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You like to sit here and daydream for hours&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re a beautiful daydreamer. Actually, you&#39;re pretty sure you&#39;re dreaming right now&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;ve got all sorts of ideas about all sorts of frogs&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_17 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Good looks like yours only happen once&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;, like that one time... but you rather not talk about it&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You could brag, but that would be rude&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_18 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;... in the vernacular. Everyone knows you&#39;re coldblooded&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... although frogs like you are coldblooded, but you appreciate the colloquialism&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... although your appreciate the colloquialism, frogs are coldblooded&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_19 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. There&#39;s so much to do and so little time&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re so happy to have evolved this way&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... amphibians are the best, even bester than reptiles&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_20 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You pride yourself in being open-minded, but only in a manner of speaking&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Although you&#39;re a small frog you&#39;re big on the inside&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You keep growing. If you keep it up you&#39;ll be a frogbeast in no time&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_21 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Your bonds last for life! That&#39;s how strong love is. YOUR love&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Your bonds last a life-time, maybe two, or three&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Once a frogfriend, always a frogfriend. It&#39;s what your frogdaddy taught you&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_22 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;... There&#39;s no need to brag, we&#39;re all frogs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re pretty good at what you do, and that&#39;s being a frog. No need to brag&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You know, you&#39;re just a small frog, and that&#39;s a pretty big deal, in a small way&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_23 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Any frog can count on you to get the job done right&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You can be counted on. You are a frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You are a hardworking frogcitizen and anyone can count on that&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_24 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You love to work hard and play harder&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... it&#39;s like they always say work hard and frog harder. That is not a pun. It&#39;s a frogsaying&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Your ancestors came to this land with nothing and now populate everything&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_25 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Your ability to find warm water is unrivaled&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You understand your surroundings perfectly and that&#39;s why you eat so well&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. They call you the frogwhisperer because you&#39;re so frog&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_26 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;re pretty sure that&#39;s a good thing&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... which is not bad for a frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;ve got class, and that&#39;s all a frog can ask... rhyme intended&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_27 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You have so much offspring as a result&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. All the frogs love you and love to love you. So much love&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re a lovable amphibian and that is good&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_28 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Everyone wants to be your neighbor&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Everyone loves being near you. As a result it&#39;s a heavily populated area&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;ll get around to it, but friends come first&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_29 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Strong opinions are what keep this place running&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You break up fights, but that&#39;s what frogfriends are for&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... all&#39;s good that frogs well, and frog is what you&#39;re all about&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_30 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;ll get it done, no matter what&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;ll move a mountain if you have to. Even if that means evolving into a bigger scarier species first&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... as a result you&#39;re constantly growing into god knows what&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_31 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;ve got a squishy center, and squishy surface. All around squishy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You have a strong feeling that squishy is good&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You have a big heart... literally. That thing is HUGE&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_32 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. It&#39;s good to care! You&#39;re a frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You throw yourself into anything 100%. You&#39;re a good jumper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re a strong frog for all that you&#39;ve been through&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_33 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. Everyone loves you and wants to love you&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You swallowed a magnet once, and now everything chases you&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... ever since you swallowed that magnet everything seems drawn to you&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_34 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You believe in the better good of frogs, they&#39;ll never catch you&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Your best friend was used in a middle school dissection you try to stay positive to honor him&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You escaped that aquarium and now intend to live life to the fullest&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_35 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You always sound like you&#39;re laughing. It&#39;s because of a genetic defect, but that&#39;s ok&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You can turn the darkest situations into a joke&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You can see the humor in everything and everyone&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_36 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;re a frog they can count on&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re blunt and that&#39;s a good thing, especially for a frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. They can count on your opinions. You are a frog&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_37 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You enjoy the deeper conversations, but not too deep. You&#39;re not that great of a jumper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... it&#39;s because of your big head. You can store lots of big ideas&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. There are so many things to talk about. You are a smart frog&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_38 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You work hard and get frogthings done&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. There&#39;s always more frog that needs frogging and you frog hard&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. There are so many frogthings to get done&quot;<\/span>]; \r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_39 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;ve got a goal and nofrog can stop you now&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You can accomplish anything you put your froghead to&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re a hardworking frog, and good at it too&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_40 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;ve lived here a long time despite all the natural predators&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You would rather eat than be eaten and that&#39;s why you&#39;re so fat&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Despite all the natural predators you&#39;re growing quite old&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_41 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You&#39;re hilarious when you get going&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You take it easy and laugh a lot. This is good for a frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Your sense of humor is not bad for a frog. It&#39;s impressive&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_42 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;... everyone can count on you&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Every frog can count on you to be a frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Every frog can count on you! You are a frog&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_43 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You never lie even if that involves telling the truth&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;... even if you have to tell the truth you&#39;ll never lie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;re a frog other frogs can count on to be a true frog&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_44 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You dig your own holes, and catch your own meals&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You catch your own food. No handouts&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You dig your own holes, and even use tools&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_45 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You come up with all sorts of applicable ideas&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. No one can catch you! You are a smart frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. They&#39;ll never catch you. You are a cunning frog&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_46 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. It&#39;s obvious from looking at your gooey surface&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Everyone can tell from your gooey surface that you have a soft center&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You have a soft center and even softer surface&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_47 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You donate your bugs to the hungry&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You regularly feed hungry fish your freshly caught butterflies&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You like to help others, and help yourself in the process. This is good frogging&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_48 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You are probably an alien but you live among the frogs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You don&#39;t think about yourself much, even if others think you&#39;re an alien&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. Sometimes you wonder if you&#39;re an alien, but you try not to think about yourself too much&quot;<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_49 <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;. You know what&#39;s up even when you don&#39;t know why just yet&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You&#39;ve got feelings. So many&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;. You can understand the struggle of being a frog and help other frogs to frog better&quot;<\/span>];\r\n<span style=\"color: #888888\">\/\/<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_aboutyou <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;great with the tadpoles&quot;<\/span><span style=\"color: #333333\">+<\/span>arr_01[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_01.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;adventurous and energetic&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_02[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_02.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;pioneering and courageous&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_03[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_03.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;enthusiastic and confident&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_04[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_04.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;dynamic and quick witted&quot;<\/span><span style=\"color: #333333\">+<\/span>arr_05[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_05.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;patient and reliable&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_06[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_06.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;warmhearted and loving&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_07[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_07.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;persistent and determined&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_08[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_08.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;placid and security loving&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_09[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_09.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;adaptable and versatile&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_10[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_10.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;communicative and witty&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_11[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_11.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;intellectual and eloquent&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_12[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_12.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;youthful and lively&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_13[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_13.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;cunning and inquisitive&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_14[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_14.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;emotional and loving&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_15[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_15.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;intuitive and imaginative&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_16[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_16.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;protective and sympathetic&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_17[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_17.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;generous and warmhearted&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_18[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_18.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;creative and enthusiastic&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_19[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_19.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;broad-minded and expansive&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_20[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_20.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;faithful and loving&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_21[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_21.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;modest and shy&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_22[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_22.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;meticulous and reliable&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_23[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_23.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;practical and diligent&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_24[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_24.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;intelligent and analytical&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_25[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_25.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;diplomatic and urbane&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_26[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_26.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;romantic and charming&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_27[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_27.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;easygoing and sociable&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_28[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_28.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;idealistic and peaceable&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_29[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_29.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;determined and forceful&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_30[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_30.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;emotional and intuitive&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_31[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_31.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;powerful and passionate&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_32[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_32.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;exciting and magnetic&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_33[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_33.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;optimistic and freedom-loving&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_34[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_34.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;jovial and good-humored&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_35[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_35.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;honest and straightforward&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_36[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_36.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;intellectual and philosophical&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_37[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_37.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;practical and prudent&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_38[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_38.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;ambitious and disciplined&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_39[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_39.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;patient and careful&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_40[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_40.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;humorous and reserved&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_41[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_41.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>],<span style=\"background-color: #fff0f0\">&quot;friendly and frogitarian&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_42[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_42.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;honest and loyal&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_43[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_43.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;original and inventive&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_44[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_44.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;independent and intellectual&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_45[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_45.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;imaginative and sensitive&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_46[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_46.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;compassionate and kind&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_47[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_47.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;selfless and unworldly&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_48[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_48.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>], <span style=\"background-color: #fff0f0\">&quot;intuitive and sympathetic&quot;<\/span> <span style=\"color: #333333\">+<\/span> arr_49[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_49.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_punctuation <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;!&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;.&quot;<\/span>];\r\n<\/pre>\n<\/div>\n<p>Ok, that&#8217;s a lot. This is the meat of the written content.<\/p>\n<p>Then we have the actual function that makes the frogification magic happen. It looks like this:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/make the frog name<\/span>\r\n<span style=\"color: #888888\">\/\/frogification of names. this is the future of naming conventions.<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> generate_frogname(){\r\n\t<span style=\"color: #888888\">\/\/frog arrays<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_frogvariant <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Froglet&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Toad&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tadpole&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Amphibian&quot;<\/span>];\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_frogplaces <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;pond&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;lake&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;swamp&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;marsh&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;woods&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;underbrush&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;creek&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;tree&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;canopy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;forest&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;woods&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;waters&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;stream&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;brook&quot;<\/span>];\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_title <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;duke&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;marquis&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;earl&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;viscount&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;baron&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;baronet&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;knight&quot;<\/span>,<span style=\"background-color: #fff0f0\">&quot;lord&quot;<\/span>];\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_akafrogs <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;Abs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Agnus&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Al-gea&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Amphibulus&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Scrubby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Crusty&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Bouncer&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Bouncy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Blinky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Booboo the Bloatoad&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Bobo&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Booboo&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Bob&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Boo&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Boogy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Bubba&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Bubble&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Buds&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Buddy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Buggy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Bumpy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chicky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chops&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chubby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fats&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fatso&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chubber&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Flubber&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chubbs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chunk&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chunky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Chunko&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Copper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Conan&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Cool Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Croaker&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Croaks&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Croaky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Crunchy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Cups&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Curmet&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Kermits&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Darty&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Dars&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Doc&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Dots&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Frogzilla&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Peppers&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ducky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ducks&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Dumbell&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Dumpy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Dumby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Edgar&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mimi&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fatso&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fatty&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fatter Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fattest&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fattest Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fatty Arbuckles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fearless Froglet&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fergie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fibby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fiddles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fillmore&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Filbert&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ferdinand&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Figaro&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Flibbit&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Flips&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Floatie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Flubbers&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Francis&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Freaky Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Freaky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Froggens&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Froggins&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Froglestew&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Freckle&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Fugie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Glossy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gobble&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gobbles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gomez&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gooey&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gordon&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gorf&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gorf&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gordito&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Greenie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gregan&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Grinner&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Grog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Guacamole&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Guacky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gub-gub&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gumball&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gus&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gus Gus&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hogie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hoogie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hoogy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Howie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hecktor&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Gerby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Herby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hippyfrog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hopkins&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hopper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hoppy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hoppity&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hoppity-Hop&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hop-Hop&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hopps-alot&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hopson&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hopston&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hot Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hot-Toad&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hugo-a-go-go&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Hugo&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ichabod&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Iggy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ivan&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Jabba&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Jabba the Jumpy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Jumpy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Jeremiah&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Jimmy da toad&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Joey&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Jorg&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Yurg&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Jumpiter&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Kermit&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Kermit Klein&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ketchup&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Kilroy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Kirby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;King Kirby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Klack&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Kokomo&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Krebbit&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Kroppy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Leaper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Leapy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Leafy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Legs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Leroy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Little Guy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Leggy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Louie&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Lumpy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Lumps&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Man-o Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Marina&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mark McGwire&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Max&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Maxter&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mermin&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Merms&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Germs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mr.Croak&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mr. Frog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mr. Fribble&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mr. Skinny&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mr. Mouth&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mister Mac&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mr. Red Bottom&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mr. Moco&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Mog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Moe Moe&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Munky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Murdock&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Nanotoad&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Noodles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Nozy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Frogy-Wan&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Patches&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Peabody&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Peanut&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Peeps&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Squeeks&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pekkle&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pickles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pickle&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Floyd&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pip&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Phyto-P&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Plop&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Plopps&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Po&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Poegy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pogo&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pookee&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Crackers&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Popcorn&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Prince Soggy Bottom&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Puddles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pug Pug&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Punkins&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Pudgetta&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Quigley&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Quiggle&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Quibbit&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Quigleys&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Quiggles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Giggles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Quiglly&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Raisin&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ruperts&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Crumbs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Shamrockfrog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Sir Croaks alot&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Skippy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Skippydippy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Skittles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Slappy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Slims&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Slimmy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Slinky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Slippy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Slick&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Slub&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Sluggs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Sluggo&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Soupy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Smeaglet&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Smiles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Smiley&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Springer&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Sprocket&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Sprog&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Sproing&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Spud&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Spuds&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Squiggly&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Squirt&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Sticky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Stinky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Stomper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Stone Cold&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Stoney&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Stubby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Stumper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Stud&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Studs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Squishy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Squeeky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Squirmy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Squirms&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tater&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tomato&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Taters&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tamoto&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;El Tamoto&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tapioca&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tiggle&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tiggles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tibbir&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Ribbits&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tommy the Toad&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tricky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tubby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tubs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Tuffy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Twiggles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Watermelonbaby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Webby&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Webs&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Wet Willy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Wembley&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Wiggles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Giggles&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Winky&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Wiggletins&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Whopper&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Xorcon&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Yggorf&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Zenon&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Zippity&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Zippy&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Zips&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Zookey&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;Zucchini&quot;<\/span>];\r\n\t<span style=\"color: #888888\">\/\/get starting values<\/span>\r\n\tstr_name <span style=\"color: #333333\">=<\/span> str_yourname;\r\n\t<span style=\"color: #888888\">\/\/aka sentence<\/span>\r\n\tstr_aka <span style=\"color: #333333\">=<\/span> arr_akafrogs[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_akafrogs.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>];\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_aka_sentence <span style=\"color: #333333\">=<\/span> [adj_aka[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>adj_aka.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; &quot;<\/span><span style=\"color: #333333\">+<\/span>str_aka, str_aka<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; &quot;<\/span><span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot;for short&quot;<\/span>];\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tarr_originalname <span style=\"color: #333333\">=<\/span> [];\r\n\tarr_originalname <span style=\"color: #333333\">=<\/span> (str_name).split(<span style=\"background-color: #fff0f0\">&quot; &quot;<\/span>);\r\n\tarr_fullname <span style=\"color: #333333\">=<\/span> (str_name).split(<span style=\"background-color: #fff0f0\">&quot; &quot;<\/span>);\r\n\t<span style=\"color: #888888\">\/\/clear<\/span>\r\n\tstr_name <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;&quot;<\/span>;\r\n\t<span style=\"color: #888888\">\/\/start<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">for<\/span>(<span style=\"color: #008800; font-weight: bold\">var<\/span> i<span style=\"color: #333333\">=<\/span><span style=\"color: #0000DD; font-weight: bold\">0<\/span>; i<span style=\"color: #333333\">&lt;<\/span>arr_fullname.length; <span style=\"color: #333333\">++<\/span>i){\r\n\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(arr_fullname[i].length<span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">4<\/span>){\r\n\t\t\tarr_fullname[i] <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;Frog&quot;<\/span><span style=\"color: #333333\">+<\/span>(arr_fullname[i].slice(<span style=\"color: #0000DD; font-weight: bold\">4<\/span>,arr_fullname[i].length));\r\n\t\t}<span style=\"color: #008800; font-weight: bold\">else<\/span> <span style=\"color: #008800; font-weight: bold\">if<\/span>(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">100<\/span><span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>){\r\n\t\t\t<span style=\"color: #008800; font-weight: bold\">var<\/span> randTitle <span style=\"color: #333333\">=<\/span> arr_frogvariant[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_frogvariant.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span>arr_title[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_title.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>];\r\n\t\t\tarr_fullname[i] <span style=\"color: #333333\">=<\/span> randTitle<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; of &quot;<\/span><span style=\"color: #333333\">+<\/span>arr_fullname[i]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot;frog&quot;<\/span>;\r\n\t\t}\r\n\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span>((i<span style=\"color: #333333\">==<\/span>arr_fullname.length<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span> <span style=\"color: #333333\">&amp;&amp;<\/span> <span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">100<\/span><span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>) <span style=\"color: #333333\">&amp;&amp;<\/span> arr_fullname.length<span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>){\r\n\t\t\tarr_fullname[i] <span style=\"color: #333333\">=<\/span> <span style=\"background-color: #fff0f0\">&quot;of the &quot;<\/span><span style=\"color: #333333\">+<\/span> arr_frogplaces[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_frogplaces.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>] <span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; of &quot;<\/span><span style=\"color: #333333\">+<\/span>arr_fullname[i];\r\n\t\t}\r\n\t\t<span style=\"color: #888888\">\/\/set to this<\/span>\r\n\t\tstr_name<span style=\"color: #333333\">+=<\/span>arr_fullname[i]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; &quot;<\/span>;\r\n\t}\r\n\t_stage.txt_aboutfrog.text <span style=\"color: #333333\">=<\/span> (<span style=\"background-color: #fff0f0\">&quot;Your frogname is: &quot;<\/span><span style=\"color: #333333\">+<\/span>str_name<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot;. &quot;<\/span><span style=\"color: #333333\">+<\/span> arr_aka_sentence[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_aka_sentence.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>] <span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot;, &quot;<\/span><span style=\"color: #333333\">+<\/span>arr_personality[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_personality.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span><span style=\"background-color: #fff0f0\">&quot; frog. You are known for being &quot;<\/span><span style=\"color: #333333\">+<\/span>arr_aboutyou[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_aboutyou.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]<span style=\"color: #333333\">+<\/span>arr_punctuation[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_punctuation.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>]);\r\n};\r\n<\/pre>\n<\/div>\n<p>It sends the value to the <code>_stage.txt_aboutfrog<\/code> text field.<\/p>\n<p>The important thing about making a good generator is how you place all the body parts. Depending on how you build it, you will most likely have a lot of random pieces, of varying shapes and sizes.<br \/>\nGetting them all to place on each-other, or relative to each-other, is the key to making something look good (and hopefully goofy).<br \/>\nSo registration points here are important, and nesting things right (if you decide to nest things, which works very well in many cases).<\/p>\n<p>We have the following structure:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/paths<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_frog <span style=\"color: #333333\">=<\/span> _stage.mc_frog;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_head <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_face.mc_head;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_body <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_body;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_arm_left <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_arm_left;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_arm_right <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_arm_right;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_arm_back_left <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_arm_back_left;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_arm_back_right <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_arm_back_right;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_eye_left <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_face.mc_eyes.mc_eye_left;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_eye_right <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_face.mc_eyes.mc_eye_right;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_mouth <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_face.mc_mouth;\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> mc_eyes <span style=\"color: #333333\">=<\/span> _stage.mc_frog.mc_face.mc_eyes;\r\n<\/pre>\n<\/div>\n<p>All clips need a proper registration point to where they connect to their appropriate body part, or body.<br \/>\nFor example, the head&#8217;s registration point is at the bottom middle. Like a neck. It connects to the body.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/head_regpoint.png\" alt=\"\" \/><\/p>\n<p>Arms are somewhere top left (for left arm) and top right (for right arm).<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/arm_regpoint.png\" alt=\"\" \/><\/p>\n<p>The body is at the bottom middle, because it will be sitting on the ground.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/body_regpoint.png\" alt=\"\" \/><\/p>\n<p>You notice from the &#8220;paths&#8221; above that things are grouped within their appropriate body part. For example, the &#8220;FACE&#8221; holds the head, eyes, and mouth. This is so, after all the placing, moving it is easier.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/grouping_face.png\" alt=\"\" \/><\/p>\n<p>The most busily grouped thing is the face. The rest is just inside of FROG.<\/p>\n<p>Of course there are many ways of doing this, but if you&#8217;ll <a href=\"https:\/\/www.youtube.com\/watch?v=VuCT9Rccy08&#038;list=PLB0aFSDY8m29hfux0K8tiSeQL0ekEQ_ke&#038;index=27\" target=\"_blank\">watch G.P. Lackey&#8217;s<\/a> presentation where he makes a frog generator on stage, he does it in a similar way. Creates many graphics, scales them, colors them, and places them.<br \/>\nI think this approach is more intuitively to visual people. It also offers the most control over the resulting character&#8217;s style.<\/p>\n<p>I found that, if the approach leaned more in the programming direction, I would have had to spend too much time programming the blobs to work as body parts and (although cooler) it would end up being pretty much the same thing in the end, but much more work. This way is faster.<\/p>\n<p>For creating the actual body parts, you make a ton of them. The starting groups act like &#8220;types&#8221;, then you can optionally &#8220;morph&#8221; them together in varying combinations to get even more types.<br \/>\nThese are all on frames inside the body part.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/frogparts.png\" alt=\"\" \/><\/p>\n<p>The generator then takes care of placing, and choosing them appropriately. Some parts that require a similar body part will choose from the same random frame. Sometimes it&#8217;s totally random so, for example, there are two different arms and the frog looks like it&#8217;s making some sort of gesture.<br \/>\nEyes are usually the same eye type. There is &#8220;tiny&#8221;, &#8220;slanted&#8221;, and &#8220;round&#8221;.<\/p>\n<p>In the very end, a minor amount of movement is applied to all the parts. To give it some life.<\/p>\n<p>The movement functionality looks like this:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008800; font-weight: bold\">var<\/span> arr_movement <span style=\"color: #333333\">=<\/span> [];<span style=\"color: #888888\">\/\/refferneces to clips that move go here, ticker loops through it<\/span>\r\n\r\n<span style=\"color: #888888\">\/\/movement for the frog<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> start_randomMovement(clip, mcProp, maxVal, minVal, decay, decimal) {\r\n\t<span style=\"color: #888888\">\/\/starting values<\/span>\r\n\tclip.ymoveval <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n\tclip.yPos <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n\tclip.yTarget <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n\tclip.yval <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n\tclip.rVar <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n\tclip.fVar <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n\tclip.yVar <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>;\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tclip.mcProp <span style=\"color: #333333\">=<\/span> mcProp;\r\n\tclip.maxVal <span style=\"color: #333333\">=<\/span> maxVal;\r\n\tclip.minVal <span style=\"color: #333333\">=<\/span> minVal;\r\n\tclip.decay <span style=\"color: #333333\">=<\/span> decay;\r\n\tclip.decimal <span style=\"color: #333333\">=<\/span> decimal;\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tarr_movement.push(clip);\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/random movement&#39;s listener<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> evnt_randomMovement(event) {\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">for<\/span>(<span style=\"color: #008800; font-weight: bold\">var<\/span> i <span style=\"color: #333333\">=<\/span> <span style=\"color: #0000DD; font-weight: bold\">0<\/span>; i<span style=\"color: #333333\">&lt;<\/span>arr_movement.length; <span style=\"color: #333333\">++<\/span>i){\r\n\t\t<span style=\"color: #008800; font-weight: bold\">var<\/span> clip <span style=\"color: #333333\">=<\/span> arr_movement[i];\r\n\t\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t\t<span style=\"color: #008800; font-weight: bold\">if<\/span> (clip.ymoveval <span style=\"color: #333333\">&lt;<\/span> <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span> <span style=\"color: #333333\">&amp;&amp;<\/span> clip.ymoveval <span style=\"color: #333333\">&gt;<\/span> <span style=\"color: #333333\">-<\/span><span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>) {\r\n\t\t\tclip.rVar <span style=\"color: #333333\">=<\/span> ((<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random() <span style=\"color: #333333\">*<\/span> <span style=\"color: #0000DD; font-weight: bold\">4<\/span>) <span style=\"color: #333333\">+<\/span> <span style=\"color: #0000DD; font-weight: bold\">4<\/span>) <span style=\"color: #333333\">\/<\/span> <span style=\"color: #0000DD; font-weight: bold\">100<\/span>);\r\n\t\t\tclip.fVar <span style=\"color: #333333\">=<\/span> ((<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random() <span style=\"color: #333333\">*<\/span> <span style=\"color: #0000DD; font-weight: bold\">4<\/span>) <span style=\"color: #333333\">+<\/span> <span style=\"color: #0000DD; font-weight: bold\">4<\/span>) <span style=\"color: #333333\">\/<\/span> <span style=\"color: #0000DD; font-weight: bold\">10<\/span>);\r\n\t\t\tclip.yVar <span style=\"color: #333333\">=<\/span> (<span style=\"color: #007020\">Math<\/span>.random() <span style=\"color: #333333\">*<\/span> (clip.maxVal <span style=\"color: #333333\">-<\/span> clip.minVal)) <span style=\"color: #333333\">+<\/span> clip.minVal;\r\n\t\t}\r\n\t\t<span style=\"color: #888888\">\/\/           <\/span>\r\n\t\tclip.yPos <span style=\"color: #333333\">=<\/span> (clip.yPos <span style=\"color: #333333\">*<\/span> clip.fVar) <span style=\"color: #333333\">+<\/span> ((clip.yVar <span style=\"color: #333333\">-<\/span> clip.yTarget) <span style=\"color: #333333\">*<\/span> clip.rVar);\r\n\t\tclip.yTarget <span style=\"color: #333333\">=<\/span> clip.yTarget <span style=\"color: #333333\">+<\/span> clip.yPos;\r\n\t\tclip.ymoveval <span style=\"color: #333333\">=<\/span> (clip.yTarget <span style=\"color: #333333\">-<\/span> clip.yval) <span style=\"color: #333333\">*<\/span> clip.decimal <span style=\"color: #333333\">+<\/span> (clip.ymoveval <span style=\"color: #333333\">*<\/span> clip.decay);\r\n\t\tclip.yval <span style=\"color: #333333\">=<\/span> clip.yval <span style=\"color: #333333\">+<\/span> clip.ymoveval;\r\n\t\tclip[clip.mcProp] <span style=\"color: #333333\">=<\/span> clip.yval;\r\n\t};\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/scale, y, and rotation mostly<\/span>\r\nstart_randomMovement(mc_mouth, <span style=\"background-color: #fff0f0\">&quot;scaleY&quot;<\/span>, .<span style=\"color: #0000DD; font-weight: bold\">5<\/span>, <span style=\"color: #0000DD; font-weight: bold\">0<\/span>, <span style=\"color: #0000DD; font-weight: bold\">1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.9<\/span>);\r\nstart_randomMovement(mc_frog.mc_face, <span style=\"background-color: #fff0f0\">&quot;y&quot;<\/span>, mc_frog.mc_face.y, mc_frog.mc_face.y<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">8<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.05<\/span>);\r\nstart_randomMovement(mc_body, <span style=\"background-color: #fff0f0\">&quot;rotation&quot;<\/span>, <span style=\"color: #0000DD; font-weight: bold\">3<\/span>, <span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">3<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.05<\/span>);<span style=\"color: #888888\">\/\/breathing<\/span>\r\nstart_randomMovement(mc_arm_left, <span style=\"background-color: #fff0f0\">&quot;rotation&quot;<\/span>, <span style=\"color: #0000DD; font-weight: bold\">5<\/span>, <span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">5<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.05<\/span>);\r\nstart_randomMovement(mc_arm_right, <span style=\"background-color: #fff0f0\">&quot;rotation&quot;<\/span>, <span style=\"color: #0000DD; font-weight: bold\">5<\/span>, <span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">5<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.05<\/span>);\r\nstart_randomMovement(mc_head, <span style=\"background-color: #fff0f0\">&quot;rotation&quot;<\/span>, <span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">3<\/span>, <span style=\"color: #0000DD; font-weight: bold\">3<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.05<\/span>);\r\nstart_randomMovement(mc_eye_left, <span style=\"background-color: #fff0f0\">&quot;y&quot;<\/span>, mc_eye_left.y,mc_eye_left.y<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">10<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.07<\/span>);\r\nstart_randomMovement(mc_eye_right, <span style=\"background-color: #fff0f0\">&quot;y&quot;<\/span>, mc_eye_right.y,mc_eye_right.y<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">10<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.1<\/span>, <span style=\"color: #6600EE; font-weight: bold\">0.07<\/span>);\r\n<span style=\"color: #888888\">\/\/ticker for movement<\/span>\r\ncreatejs.Ticker.addEventListener(<span style=\"background-color: #fff0f0\">&quot;tick&quot;<\/span>, evnt_randomMovement);\r\n<\/pre>\n<\/div>\n<p>Whatever part you wish to move is pushed to the <code>arr_movement<\/code> array. You give it some values because all parts move different. For example, the mouth (if there is one) is very erratic.<br \/>\nThe rest is fairly self explanatory.<\/p>\n<p>In the <a href=\"http:\/\/frogs.alienmelon.com\/\" target=\"_blank\">original ActionScript version<\/a> there where also lines being drawn to the eyes.<br \/>\nExample of that, so you know what I mean:<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008800; font-weight: bold\">function <\/span><span style=\"color: #0066BB; font-weight: bold\">evnt_drawEyeline<\/span><span style=\"color: #333333\">(<\/span>event<span style=\"color: #333333\">:<\/span><span style=\"color: #333399; font-weight: bold\">Event<\/span><span style=\"color: #333333\">){<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span><span style=\"color: #333333\">(<\/span>bool_drawEyeLine<span style=\"color: #333333\">){<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">clear<\/span><span style=\"color: #333333\">();<\/span>\r\n\t\t<span style=\"color: #008800; font-weight: bold\">var<\/span> point_start:<span style=\"color: #333399; font-weight: bold\">Point<\/span> <span style=\"color: #333333\">=<\/span> mc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">globalToLocal<\/span><span style=\"color: #333333\">(<\/span>mc_eye_left<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">localToGlobal<\/span><span style=\"color: #333333\">(<\/span><span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #333399; font-weight: bold\">Point<\/span><span style=\"color: #333333\">()));<\/span>\r\n\t\t<span style=\"color: #008800; font-weight: bold\">var<\/span> point_end:<span style=\"color: #333399; font-weight: bold\">Point<\/span> <span style=\"color: #333333\">=<\/span> mc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">globalToLocal<\/span><span style=\"color: #333333\">(<\/span>mc_head<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">localToGlobal<\/span><span style=\"color: #333333\">(<\/span><span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #333399; font-weight: bold\">Point<\/span><span style=\"color: #333333\">()));<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">lineStyle<\/span><span style=\"color: #333333\">(<\/span><span style=\"color: #0000DD; font-weight: bold\">15<\/span><span style=\"color: #333333\">,<\/span> calc_hexTint<span style=\"color: #333333\">(<\/span>col_frog<span style=\"color: #333333\">,<\/span><span style=\"color: #6600EE; font-weight: bold\">0.7<\/span><span style=\"color: #333333\">));<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">moveTo<\/span><span style=\"color: #333333\">(<\/span>point_start<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">x<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">,<\/span>point_start<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">y<\/span><span style=\"color: #333333\">);<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">lineTo<\/span><span style=\"color: #333333\">(<\/span>point_end<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">x<\/span><span style=\"color: #333333\">-<\/span>mc_head<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">width<\/span><span style=\"color: #000000; background-color: #fff0ff\">\/4,point_end.y-mc_head.height\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">);<\/span>\r\n\t\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t\tpoint_start <span style=\"color: #333333\">=<\/span> mc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">globalToLocal<\/span><span style=\"color: #333333\">(<\/span>mc_eye_right<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">localToGlobal<\/span><span style=\"color: #333333\">(<\/span><span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #333399; font-weight: bold\">Point<\/span><span style=\"color: #333333\">()));<\/span>\r\n\t\tpoint_end <span style=\"color: #333333\">=<\/span> mc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">globalToLocal<\/span><span style=\"color: #333333\">(<\/span>mc_head<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">localToGlobal<\/span><span style=\"color: #333333\">(<\/span><span style=\"color: #008800; font-weight: bold\">new<\/span> <span style=\"color: #333399; font-weight: bold\">Point<\/span><span style=\"color: #333333\">()));<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">lineStyle<\/span><span style=\"color: #333333\">(<\/span><span style=\"color: #0000DD; font-weight: bold\">15<\/span><span style=\"color: #333333\">,<\/span> calc_hexTint<span style=\"color: #333333\">(<\/span>col_frog<span style=\"color: #333333\">,<\/span><span style=\"color: #6600EE; font-weight: bold\">0.7<\/span><span style=\"color: #333333\">));<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">moveTo<\/span><span style=\"color: #333333\">(<\/span>point_start<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">x<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">,<\/span>point_start<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">y<\/span><span style=\"color: #333333\">);<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">lineTo<\/span><span style=\"color: #333333\">(<\/span>point_end<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">x<\/span><span style=\"color: #333333\">+<\/span>mc_head<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">width<\/span><span style=\"color: #000000; background-color: #fff0ff\">\/4,point_end.y-mc_head.height\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">);<\/span>\r\n\t\t<span style=\"color: #888888\">\/\/graphics.clear();\/\/in case of on enter and must follow around keep drawing (in event)<\/span>\r\n\t<span style=\"color: #333333\">}<\/span><span style=\"color: #008800; font-weight: bold\">else<\/span><span style=\"color: #333333\">{<\/span>\r\n\t\tmc_eyes<span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">graphics<\/span><span style=\"color: #333333\">.<\/span><span style=\"color: #0000CC\">clear<\/span><span style=\"color: #333333\">();<\/span>\r\n\t<span style=\"color: #333333\">}<\/span>\r\n<span style=\"color: #333333\">}<\/span>\r\n<\/pre>\n<\/div>\n<p>This was so that the eyes always stay attached to their bodies. Sometimes the eyes hover just a bit above the head. I was testing it again in this version and decided I will not do this, because they look sort of adorable with the eyes doing that.<br \/>\nIf you like you can incorporate that yourself. <code>bool_drawEyeLine<\/code> is handled in the <code>generateFrog()<\/code> function I will be describing shortly.<\/p>\n<p>The original ActionScript version was a bit more complicated. It did more. This is simplified for the sake of a readable tutorial.<\/p>\n<p><strong>The backgrounds&#8230;<\/strong><\/p>\n<p>There are three different backgrounds. Space, Mountains, and Stream. They all have their own ambient soundtrack playing. Space is super rare. Space is for the super rare Spacefrogs.<br \/>\nThe function that sets the background, and takes care of the associating soundtrack is as follows:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/set a background<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> set_background(){\r\n\t<span style=\"color: #888888\">\/\/stop the sounds first (if curr_background has a value)<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(curr_background <span style=\"color: #333333\">!=<\/span> <span style=\"background-color: #fff0f0\">&quot;&quot;<\/span>){\r\n\t\tstopSound(<span style=\"background-color: #fff0f0\">&quot;snd_&quot;<\/span><span style=\"color: #333333\">+<\/span>curr_background);\r\n\t};\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> arr_backgrounds <span style=\"color: #333333\">=<\/span> [<span style=\"background-color: #fff0f0\">&quot;space&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;mountains&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;stream&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;mountains&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;stream&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;mountains&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;stream&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;mountains&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;stream&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;mountains&quot;<\/span>, <span style=\"background-color: #fff0f0\">&quot;stream&quot;<\/span>];\r\n\tcurr_background <span style=\"color: #333333\">=<\/span> arr_backgrounds[<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>arr_backgrounds.length)<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>];\r\n\t_stage.mc_foreground.gotoAndStop(curr_background);\r\n\t_stage.mc_background.gotoAndStop(curr_background);\r\n\t<span style=\"color: #888888\">\/\/set soundscape<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(curr_background <span style=\"color: #333333\">==<\/span> <span style=\"background-color: #fff0f0\">&quot;space&quot;<\/span>){\r\n\t\tplaySoundLoop(<span style=\"background-color: #fff0f0\">&quot;snd_space&quot;<\/span>, <span style=\"color: #0000DD; font-weight: bold\">999<\/span>);\r\n\t}\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(curr_background <span style=\"color: #333333\">==<\/span> <span style=\"background-color: #fff0f0\">&quot;stream&quot;<\/span>){\r\n\t\tplaySoundLoop(<span style=\"background-color: #fff0f0\">&quot;snd_stream&quot;<\/span>, <span style=\"color: #0000DD; font-weight: bold\">999<\/span>);\r\n\t}\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(curr_background <span style=\"color: #333333\">==<\/span> <span style=\"background-color: #fff0f0\">&quot;mountains&quot;<\/span>){\r\n\t\tplaySoundLoop(<span style=\"background-color: #fff0f0\">&quot;snd_mountains&quot;<\/span>, <span style=\"color: #0000DD; font-weight: bold\">999<\/span>);\r\n\t}\r\n}\r\n<\/pre>\n<\/div>\n<p><code>_stage.mc_foreground<\/code> is the foreground clip that contains foreground details like rocks and grass.<br \/>\n<code>_stage.mc_background<\/code> is the large scene in the back.<\/p>\n<p>These two clips have frame labels named <code>\"space\", \"mountains\", \"stream\"<\/code>. It&#8217;s very simple.<br \/>\nThe sound is then handled. Sound ID&#8217;s for these areas look like this:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\">{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_mountains&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_SCENE_MOUNTAIN.mp3&quot;<\/span>},\r\n{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_stream&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_SCENE_STREAM.mp3&quot;<\/span>},\r\n{id<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;snd_space&quot;<\/span>, src<span style=\"color: #333333\">:<\/span><span style=\"background-color: #fff0f0\">&quot;AUD_SCENE_SPACE.mp3&quot;<\/span>},\r\n<\/pre>\n<\/div>\n<p>So that&#8217;s why the (<code>\"snd_\"+curr_background<\/code>)&#8230; If you stop a sound that doesn&#8217;t exist things break. You have to be specific.<\/p>\n<p>Now on to the <code>generateFrog()<\/code> function&#8230;<\/p>\n<p>The <code>generateFrog()<\/code> function is the big thing where all the magic happens. It looks like this:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/generate the frog (triggered by the &#39;refresh&#39; button)<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> generateFrog(){\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tstopAllSounds();\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tplay_transition(_stage.mc_transition_bottom);\r\n\tplay_transition(_stage.mc_transition_top);\r\n\tmc_frog.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n\t_stage.btn_save.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;<span style=\"color: #888888\">\/\/only appears after frogs start coming in<\/span>\r\n\t_stage.mc_ui_back.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n\t_stage.txt_aboutfrog.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n\tset_large_ribbon();\r\n\tset_background();\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tgenerate_frogname();\r\n\t<span style=\"color: #888888\">\/\/random head and body<\/span>\r\n\tgotoAndStopRandom(mc_head);\r\n\tgotoAndStopRandom(mc_body);\r\n\t<span style=\"color: #888888\">\/\/get a random arm (frame number)<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_arm_frame <span style=\"color: #333333\">=<\/span> (<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>mc_arm_left.timeline.duration)); <span style=\"color: #888888\">\/\/same frame for both arms<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">100<\/span><span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>){<span style=\"color: #888888\">\/\/50 chance of both arms being same frame<\/span>\r\n\t\tmc_arm_left.gotoAndStop(num_arm_frame);\r\n\t\tmc_arm_right.gotoAndStop(num_arm_frame);\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span>{\r\n\t\t<span style=\"color: #888888\">\/\/random gesture<\/span>\r\n\t\tgotoAndStopRandom(mc_arm_left);\r\n\t\tgotoAndStopRandom(mc_arm_right);\t\r\n\t}\r\n\t<span style=\"color: #888888\">\/\/eyes and legs<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_arm_back_frame <span style=\"color: #333333\">=<\/span> (<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>mc_arm_back_left.timeline.duration));\r\n\tmc_arm_back_left.gotoAndStop(num_arm_back_frame);\r\n\tmc_arm_back_right.gotoAndStop(num_arm_back_frame);\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_eye_frame <span style=\"color: #333333\">=<\/span> (<span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span>mc_eye_left.timeline.duration));\r\n\tmc_eye_left.gotoAndStop(num_eye_frame);\r\n\tmc_eye_right.gotoAndStop(num_eye_frame);\r\n\t<span style=\"color: #888888\">\/\/does it have a mouth? show or hide it...<\/span>\r\n\t<span style=\"color: #888888\">\/\/if it has a mouth, frog must sing<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span> (<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">100<\/span><span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>){\r\n\t\tplayFrogSound();\r\n\t\tmc_mouth.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span>{\r\n\t\tstopFrogSound()\r\n\t\tmc_mouth.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\t\r\n\t}\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\t<span style=\"color: #888888\">\/\/size the body parts. frogs come in many shapes and sizes<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_sizeoffset <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">10<\/span>);\r\n\tmc_head.width <span style=\"color: #333333\">=<\/span> mc_body.width<span style=\"color: #333333\">+<\/span>num_sizeoffset;\r\n\tmc_arm_left.width <span style=\"color: #333333\">=<\/span> num_arm_left_width<span style=\"color: #333333\">+<\/span>num_sizeoffset;\r\n\tmc_arm_left.height <span style=\"color: #333333\">=<\/span> num_arm_left_height<span style=\"color: #333333\">+<\/span>num_sizeoffset;\r\n\tmc_arm_right.width <span style=\"color: #333333\">=<\/span> num_arm_left_width<span style=\"color: #333333\">+<\/span>num_sizeoffset;\r\n\tmc_arm_right.height <span style=\"color: #333333\">=<\/span> num_arm_left_height<span style=\"color: #333333\">+<\/span>num_sizeoffset;\r\n\t<span style=\"color: #888888\">\/\/eyes (reset size first for eyes) - eyes must have an if else that determines if both are different size or same size (circles only both different size)<\/span>\r\n\t<span style=\"color: #888888\">\/\/reset<\/span>\r\n\tmc_eye_left.width <span style=\"color: #333333\">=<\/span> mc_eye_right.width <span style=\"color: #333333\">=<\/span> num_eye_left_width;\r\n\tmc_eye_left.height <span style=\"color: #333333\">=<\/span> mc_eye_right.height <span style=\"color: #333333\">=<\/span> num_eye_left_height;\r\n\t<span style=\"color: #888888\">\/\/if round allow random size, else no (uniform size)<\/span>\r\n\t<span style=\"color: #888888\">\/\/mc_eye_right.frameBounds[mc_eye_right.currentFrame].width<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(eye_type<span style=\"color: #333333\">==<\/span><span style=\"background-color: #fff0f0\">&quot;round&quot;<\/span>){\r\n\t\tmc_eye_left.height <span style=\"color: #333333\">=<\/span> mc_eye_left.width <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(number_randomRange(return_bounds(mc_eye_right).width, return_bounds(mc_eye_right).width<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">8<\/span>));\r\n\t\tmc_eye_right.height <span style=\"color: #333333\">=<\/span> mc_eye_right.width <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(number_randomRange(return_bounds(mc_eye_right).width, return_bounds(mc_eye_right).width<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">8<\/span>));\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span> <span style=\"color: #008800; font-weight: bold\">if<\/span>(eye_type<span style=\"color: #333333\">==<\/span><span style=\"background-color: #fff0f0\">&quot;slanted&quot;<\/span>){\r\n\t\tmc_eye_left.height <span style=\"color: #333333\">=<\/span> mc_eye_right.height <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(number_randomRange(return_bounds(mc_eye_right).height, return_bounds(mc_eye_right).height<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>));\r\n\t\tmc_eye_left.width <span style=\"color: #333333\">=<\/span> mc_eye_right.width <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(number_randomRange(return_bounds(mc_eye_right).width, return_bounds(mc_eye_right).width<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">8<\/span>));\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span>{<span style=\"color: #888888\">\/\/tiny or other<\/span>\r\n\t\tmc_eye_left.height <span style=\"color: #333333\">=<\/span> mc_eye_left.width <span style=\"color: #333333\">=<\/span> number_randomRange(<span style=\"color: #0000DD; font-weight: bold\">2<\/span>, <span style=\"color: #0000DD; font-weight: bold\">7<\/span>);\r\n\t\tmc_eye_right.height <span style=\"color: #333333\">=<\/span> mc_eye_right.width <span style=\"color: #333333\">=<\/span> number_randomRange(<span style=\"color: #0000DD; font-weight: bold\">2<\/span>, <span style=\"color: #0000DD; font-weight: bold\">7<\/span>);\r\n\t}\r\n\tmc_mouth.width <span style=\"color: #333333\">=<\/span> number_randomRange(<span style=\"color: #0000DD; font-weight: bold\">20<\/span>, mc_head.width<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">5<\/span>);<span style=\"color: #888888\">\/\/-width of line<\/span>\r\n\tmc_mouth.height <span style=\"color: #333333\">=<\/span> number_randomRange(<span style=\"color: #0000DD; font-weight: bold\">10<\/span>, <span style=\"color: #0000DD; font-weight: bold\">85<\/span>);\r\n\tnum_mouth_height <span style=\"color: #333333\">=<\/span> mc_mouth.height;<span style=\"color: #888888\">\/\/max value to tweak<\/span>\r\n\t\r\n\t<span style=\"color: #888888\">\/\/place<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_placeoffset <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(number_randomRange(<span style=\"color: #0000DD; font-weight: bold\">20<\/span>, <span style=\"color: #0000DD; font-weight: bold\">30<\/span>));\r\n\tmc_head.y <span style=\"color: #333333\">=<\/span> (mc_body.y<span style=\"color: #333333\">-<\/span>return_bounds(mc_body).height)<span style=\"color: #333333\">+<\/span>(num_placeoffset);<span style=\"color: #888888\">\/\/offset could be random<\/span>\r\n\t\r\n\tmc_arm_left.x <span style=\"color: #333333\">=<\/span> mc_body.x<span style=\"color: #333333\">-<\/span>return_bounds(mc_body).width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">+<\/span><span style=\"color: #0000DD; font-weight: bold\">3<\/span>;\r\n\tmc_arm_left.y <span style=\"color: #333333\">=<\/span> mc_body.y<span style=\"color: #333333\">-<\/span>return_bounds(mc_body).height<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>;\r\n\tmc_arm_right.x <span style=\"color: #333333\">=<\/span> mc_body.x<span style=\"color: #333333\">+<\/span>return_bounds(mc_body).width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">3<\/span>;\r\n\tmc_arm_right.y <span style=\"color: #333333\">=<\/span> mc_body.y<span style=\"color: #333333\">-<\/span>return_bounds(mc_body).height<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>;\r\n\t\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_arm_back_placeoffset <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">Math<\/span>.ceil(number_randomRange(<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">10<\/span>,<span style=\"color: #0000DD; font-weight: bold\">10<\/span>));\r\n\tmc_arm_back_left.x <span style=\"color: #333333\">=<\/span> mc_body.x<span style=\"color: #333333\">-<\/span>return_bounds(mc_body).width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">+<\/span><span style=\"color: #0000DD; font-weight: bold\">10<\/span>;\r\n\tmc_arm_back_left.y <span style=\"color: #333333\">=<\/span> mc_body.y<span style=\"color: #333333\">-<\/span>return_bounds(mc_body).height<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">+<\/span>num_arm_back_placeoffset;\r\n\r\n\tmc_arm_back_right.x <span style=\"color: #333333\">=<\/span> mc_body.x<span style=\"color: #333333\">+<\/span>return_bounds(mc_body).width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">10<\/span>;\r\n\tmc_arm_back_right.y <span style=\"color: #333333\">=<\/span> mc_body.y<span style=\"color: #333333\">-<\/span>return_bounds(mc_body).height<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span><span style=\"color: #333333\">+<\/span>num_arm_back_placeoffset;\r\n\t\r\n\tmc_eyes.x <span style=\"color: #333333\">=<\/span> mc_head.x;\r\n\tmc_eyes.y <span style=\"color: #333333\">=<\/span> mc_head.y <span style=\"color: #333333\">-<\/span> (return_bounds(mc_head).height<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span>) <span style=\"color: #333333\">+<\/span> number_randomRange(<span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">10<\/span>,<span style=\"color: #0000DD; font-weight: bold\">10<\/span>);\r\n\t\r\n\t<span style=\"color: #888888\">\/\/minimum is -20 for left 20 for right<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> num_eyes_place <span style=\"color: #333333\">=<\/span> number_randomRange(<span style=\"color: #0000DD; font-weight: bold\">20<\/span>, return_bounds(mc_head).width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">2<\/span> <span style=\"color: #333333\">+<\/span> (return_bounds(mc_eye_left).width) <span style=\"color: #333333\">-<\/span> return_bounds(mc_head).width<span style=\"color: #333333\">\/<\/span><span style=\"color: #0000DD; font-weight: bold\">8<\/span>);<span style=\"color: #888888\">\/\/ - one fourth of the head<\/span>\r\n\tmc_eye_left.x <span style=\"color: #333333\">=<\/span> <span style=\"color: #333333\">-<\/span>num_eyes_place;<span style=\"color: #888888\">\/\/left eye on left side of head + width of eye to keep it on the head<\/span>\r\n\tmc_eye_right.x <span style=\"color: #333333\">=<\/span> num_eyes_place;<span style=\"color: #888888\">\/\/<\/span>\r\n\t\r\n\t<span style=\"color: #888888\">\/\/<\/span>\r\n\tmc_mouth.x <span style=\"color: #333333\">=<\/span> mc_head.x;\r\n\tmc_mouth.y <span style=\"color: #333333\">=<\/span> mc_head.y;\r\n\t\r\n\t<span style=\"color: #888888\">\/\/draw lines to eyes to connect to body<\/span>\r\n\t<span style=\"color: #888888\">\/\/this is handled in an event (constant timer because movement updates)<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(eye_type <span style=\"color: #333333\">==<\/span> <span style=\"background-color: #fff0f0\">&quot;round&quot;<\/span> <span style=\"color: #333333\">||<\/span> eye_type <span style=\"color: #333333\">==<\/span> <span style=\"background-color: #fff0f0\">&quot;slanted&quot;<\/span>){\r\n\t\tbool_drawEyeLine <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n\t}<span style=\"color: #008800; font-weight: bold\">else<\/span>{\r\n\t\tbool_drawEyeLine <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n\t}\r\n\t\r\n\t<span style=\"color: #888888\">\/\/flip body parts<\/span>\r\n\t<span style=\"color: #888888\">\/\/for added randomness<\/span>\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">100<\/span><span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>){\r\n\t\tmc_head.scaleX <span style=\"color: #333333\">*=<\/span> <span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>;\r\n\t}\r\n\t<span style=\"color: #008800; font-weight: bold\">if<\/span>(<span style=\"color: #007020\">Math<\/span>.random()<span style=\"color: #333333\">*<\/span><span style=\"color: #0000DD; font-weight: bold\">100<\/span><span style=\"color: #333333\">&gt;<\/span><span style=\"color: #0000DD; font-weight: bold\">50<\/span>){\r\n\t\tmc_body.scaleX <span style=\"color: #333333\">*=<\/span> <span style=\"color: #333333\">-<\/span><span style=\"color: #0000DD; font-weight: bold\">1<\/span>;\r\n\t}\r\n}\r\n<\/pre>\n<\/div>\n<p>The beginning takes care of the new scene and sounds. Also setting visibility of the UI incase it&#8217;s hidden.<br \/>\nThen the frogname is generated.<br \/>\nThe rest is all body and placement of the body.<br \/>\nThe comments should make sense of the mess.<\/p>\n<p>As you can see, the:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/returns a random number range<\/span>\r\n<span style=\"color: #888888\">\/\/eye calc: eye1 = random number in from 0, eye2 = width of head - random number in...<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> number_randomRange(min, max){\r\n\t<span style=\"color: #008800; font-weight: bold\">return<\/span> min <span style=\"color: #333333\">+<\/span> (max <span style=\"color: #333333\">-<\/span> min) <span style=\"color: #333333\">*<\/span> <span style=\"color: #007020\">Math<\/span>.random();\r\n}\r\n\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> return_bounds(clip){\r\n\t<span style=\"color: #008800; font-weight: bold\">return<\/span> clip.getTransformedBounds();\r\n}\r\n<\/pre>\n<\/div>\n<p>Are being heavily used.<\/p>\n<p>At the end this is all called in the handler for the refresh button:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008800; font-weight: bold\">function<\/span> evnt_refresh(event){\r\n\tgenerateFrog();\r\n\tplayEvntSound();\r\n}\r\n<\/pre>\n<\/div>\n<p>And that&#8217;s it for the meat of it!<\/p>\n<p>&#8212;<\/p>\n<p><strong>SAVING THE FROG<\/strong><\/p>\n<p>The idea here is that once you found your perfect frog. Your frog soulmate, or frog spirit guide. You can save it as a pretty picture. We&#8217;ll do this as .png.<\/p>\n<p>There are a few ways to save a canvas to image. Most notably <code>canvas.toDataURL<\/code>.<br \/>\nIf I remember right:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008800; font-weight: bold\">var<\/span> canvas <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">document<\/span>.getElementsByTagName(<span style=\"background-color: #fff0f0\">&quot;canvas&quot;<\/span>)[<span style=\"color: #0000DD; font-weight: bold\">0<\/span>];\r\n<span style=\"color: #008800; font-weight: bold\">var<\/span> dataURL <span style=\"color: #333333\">=<\/span> canvas.toDataURL(<span style=\"background-color: #fff0f0\">&#39;image\/png&#39;<\/span>);\r\n<span style=\"color: #007020\">window<\/span>.open(dataURL);\r\n<\/pre>\n<\/div>\n<p>There are also many libraries, resources, and tutorials for doing this. To name some:<\/p>\n<p><a href=\"https:\/\/github.com\/gillyb\/reimg\" target=\"_blank\">https:\/\/github.com\/gillyb\/reimg<\/a><br \/>\n<a href=\"https:\/\/github.com\/hongru\/canvas2image\" target=\"_blank\">https:\/\/github.com\/hongru\/canvas2image<\/a><br \/>\n<a href=\"http:\/\/greenethumb.com\/article\/1429\/user-friendly-image-saving-from-the-canvas\/\" target=\"_blank\">http:\/\/greenethumb.com\/article\/1429\/user-friendly-image-saving-from-the-canvas\/<\/a><br \/>\n<a href=\"https:\/\/github.com\/eligrey\/FileSaver.js\/\" target=\"_blank\">https:\/\/github.com\/eligrey\/FileSaver.js\/<\/a><br \/>\n<a href=\"https:\/\/github.com\/aaccurso\/canvas-image-saver\" target=\"_blank\">https:\/\/github.com\/aaccurso\/canvas-image-saver<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/923885\/capture-html-canvas-as-gif-jpg-png-pdf\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/923885\/capture-html-canvas-as-gif-jpg-png-pdf<\/a><\/p>\n<p>Also, in the original ActionScript version you could save as both .png or record your frog and save it as an animated .gif. You can easily accomplish both of these things with javascript. There are a few solutions for recording canvas to animated .gif. Most notably:<\/p>\n<p><a href=\"https:\/\/github.com\/aaccurso\/canvas-image-saver\" target=\"_blank\">https:\/\/github.com\/aaccurso\/canvas-image-saver<\/a><br \/>\n<a href=\"http:\/\/antimatter15.com\/wp\/2010\/07\/javascript-to-animated-gif\/\" target=\"_blank\">http:\/\/antimatter15.com\/wp\/2010\/07\/javascript-to-animated-gif\/<\/a><br \/>\n<a href=\"https:\/\/github.com\/jnordberg\/gif.js\" target=\"_blank\">https:\/\/github.com\/jnordberg\/gif.js<\/a><\/p>\n<p>So at the moment, to keep things simple, I&#8217;ll just do this:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #888888\">\/\/called at the end of the camera shutter animation<\/span>\r\nsaveFrog <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">function<\/span>(){\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> canvas <span style=\"color: #333333\">=<\/span> <span style=\"color: #007020\">document<\/span>.getElementsByTagName(<span style=\"background-color: #fff0f0\">&quot;canvas&quot;<\/span>)[<span style=\"color: #0000DD; font-weight: bold\">0<\/span>];\r\n\t<span style=\"color: #008800; font-weight: bold\">var<\/span> dataURL <span style=\"color: #333333\">=<\/span> canvas.toDataURL(<span style=\"background-color: #fff0f0\">&#39;image\/png&#39;<\/span>);\r\n    <span style=\"color: #007020\">window<\/span>.open(dataURL);\r\n\t<span style=\"color: #888888\">\/\/put it back the way it was<\/span>\r\n\tset_large_ribbon();\r\n\t_stage.btn_refresh.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n\t_stage.btn_save.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">true<\/span>;\r\n}\r\n\r\n<span style=\"color: #888888\">\/\/button event for downloading the frog (save as image)<\/span>\r\n<span style=\"color: #008800; font-weight: bold\">function<\/span> event_saveFrog(event){\r\n\t<span style=\"color: #888888\">\/\/hide UI and make it look nice for the picture<\/span>\r\n\tset_small_ribbon();\r\n\t_stage.btn_refresh.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n\t_stage.btn_save.visible <span style=\"color: #333333\">=<\/span> <span style=\"color: #008800; font-weight: bold\">false<\/span>;\r\n\t<span style=\"color: #888888\">\/\/camera shutter<\/span>\r\n\t_stage.mc_camera.play();\r\n\tplaySound(<span style=\"background-color: #fff0f0\">&quot;snd_camera&quot;<\/span>);\r\n}\r\n<\/pre>\n<\/div>\n<p>This can be made fancy some other time.<br \/>\nThe important thing here is to re-arrange the UI so it&#8217;s nice for the picture (get rid of the buttons, and center the banner again). Then play a little camera shutter animation.<br \/>\nWhen that&#8217;s done, save the frog. Put everything back the way it was.<\/p>\n<p>The picture will open in a new browser window, where you can save it yourself.<\/p>\n<p>By the way if you run this (save the picture part) locally you may get &#8220;Tainted canvases may not be exported.&#8221;. It&#8217;s explained here: <a href=\"http:\/\/stackoverflow.com\/questions\/22710627\/tainted-canvases-may-not-be-exported\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/22710627\/tainted-canvases-may-not-be-exported<\/a><\/p>\n<p>&#8212;<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/nathalielawhead.com\/noodles\/frogtutorial_screenshots\/download.png\" alt=\"\" \/><\/p>\n<p>That&#8217;s about it! Frog generators are tons of fun. :)<br \/>\nAgain, here are the download links to the sourcefiles and end result:<\/p>\n<p>PLAY it here: <a href=\"http:\/\/frogs.alienmelon.com\/html5\/\" target=\"_blank\">http:\/\/frogs.alienmelon.com\/html5\/<\/a><\/p>\n<p>DOWNLOAD sourcefiles: <a href=\"http:\/\/nathalielawhead.com\/sourcefiles\/Weird_Alien_Frogs\/\" target=\"_blank\">http:\/\/nathalielawhead.com\/sourcefiles\/Weird_Alien_Frogs\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can VIEW the end result here: http:\/\/frogs.alienmelon.com\/html5\/ You can DOWNLOAD the sourcefiles here: http:\/\/nathalielawhead.com\/sourcefiles\/Weird_Alien_Frogs\/ This tutorial will walk you through using Animate to make a procedural frog generator. It will cover all the basics of using the HTML5 Canvas output, as well as timeline scripting for the functionality. For those that are interested I also have a tutorial for making a game with CreateJS + the canvas in Flash\/Animate here. It&#8217;s a bit older, and some of the issues (and resulting workarounds) I mention there no longer apply. Although the tutorial itself is still fairly relevant. It&#8217;s also interesting&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":4522,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[30,12],"tags":[],"class_list":["post-3508","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games","category-resources"],"_links":{"self":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/posts\/3508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/comments?post=3508"}],"version-history":[{"count":5,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/posts\/3508\/revisions"}],"predecessor-version":[{"id":3513,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/posts\/3508\/revisions\/3513"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/media\/4522"}],"wp:attachment":[{"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/media?parent=3508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/categories?post=3508"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nathalielawhead.com\/candybox\/wp-json\/wp\/v2\/tags?post=3508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}