{"id":470,"date":"2010-01-26T11:32:13","date_gmt":"2010-01-26T18:32:13","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=2659"},"modified":"2010-01-26T11:32:13","modified_gmt":"2010-01-26T18:32:13","slug":"as-quiz-12","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=470","title":{"rendered":"AS Quiz # 12"},"content":{"rendered":"<p>Today&#8217;s quiz is not multiple choice. Instead, use your choice of the Graphics class or BitmapData to write a function that generates the below image:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/actionsnippet.com\/wp-content\/color_picker.jpg\" \/><\/p>\n<p>Your function need not take any arguments, it need only return a display object containing the above image.<\/p>\n<p>Feel free to post your solution in the comments.<\/p>\n<p>[EDIT] Solutions:<\/p>\n<p>The solutions that have been posted in the comments so far are REALLY nice &#8211; they&#8217;re all worth checking out&#8230; and I think everyone posted their code to wonderfl so you can see the result without needing to open flash&#8230;.<\/p>\n<p>My two solutions:<br \/>\nThe first solution is a variation on an example from the book I wrote with Rich Shupe:<br \/>\n<a href=\"http:\/\/www.actionsnippet.com\/quiz_answers\/quiz_12.html\">First Solution<\/a><\/p>\n<p>The next solution is actually in an old post from this site &#8211; it uses setPixel and HSV &#8211; RGB conversion:<br \/>\n<a href=\"https:\/\/actionsnippet.com\/?p=797\">Second Solution<\/a><\/p>\n<p>Thanks to everyone who posted solutions so far &#8211; I&#8217;m surprised again by how many people participate in this format of quiz.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s quiz is not multiple choice. Instead, use your choice of the Graphics class or BitmapData to write a function that generates the below image: Your function need not take any arguments, it need only return a display object containing the above image. Feel free to post your solution in the comments. [EDIT] Solutions: The [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146],"tags":[3,14,4,147],"class_list":["post-470","post","type-post","status-publish","format-standard","hentry","category-quiz","tag-actionscript","tag-as3","tag-flash","tag-quiz"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=470"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/470\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}