{"id":94,"date":"2007-07-11T10:35:24","date_gmt":"2007-07-11T15:35:24","guid":{"rendered":"http:\/\/www.pixelwit.com\/blog\/2007\/07\/11\/combining-vectors-with-flash\/"},"modified":"2009-08-14T05:05:10","modified_gmt":"2009-08-14T10:05:10","slug":"combining-vectors-with-flash","status":"publish","type":"post","link":"https:\/\/www.pixelwit.com\/blog\/2007\/07\/11\/combining-vectors-with-flash\/","title":{"rendered":"Combining Vectors with Flash"},"content":{"rendered":"<p>Flash has always managed to draw vector shapes very quickly and when all things are considered, you have to admit that it can handle quite a few shapes before puking and bringing things to a crashing halt.  But not too many people take advantage of that fact so I&#8217;d like to show an example of what you can do with Flash if you never &#8220;lift your pen&#8221; or if you don&#8217;t issue an &#8220;endFill&#8221; or &#8220;beginFill&#8221; command while drawing various shapes.  To get a better idea of what I&#8217;m talking about, try clicking and dragging in the SWF below (pressing any key clears the screen):<\/p>\n<p>\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t\t\tid=\"fm_drawfunk_06_1822354360\"\n\t\t\tclass=\"flashmovie\"\n\t\t\twidth=\"500\"\n\t\t\theight=\"800\">\n\t<param name=\"movie\" value=\"\/blog\/wp-content\/uploads\/2007\/07\/drawfunk_06.swf\" \/>\n\t<!--[if !IE]>-->\n\t<object\ttype=\"application\/x-shockwave-flash\"\n\t\t\tdata=\"\/blog\/wp-content\/uploads\/2007\/07\/drawfunk_06.swf\"\n\t\t\tname=\"fm_drawfunk_06_1822354360\"\n\t\t\twidth=\"500\"\n\t\t\theight=\"800\">\n\t<!--<![endif]-->\n\t\t\n\t<!--[if !IE]>-->\n\t<\/object>\n\t<!--<![endif]-->\n<\/object><!--more--><\/p>\n<p>That checkerboard pattern is a result of the way Flash draws overlapping shapes under one beginFill command.<\/p>\n<p>In the following SWF I used circles to create a similar effect.  Clicking the mouse \"flattens\" the vectors to a bitmap image.  Clicking again restarts the process with a new random color.  <strong>Click to activate<\/strong>.<\/p>\n\n<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\n\t\t\tid=\"fm_randcircles_01_406724978\"\n\t\t\tclass=\"flashmovie\"\n\t\t\twidth=\"500\"\n\t\t\theight=\"800\">\n\t<param name=\"movie\" value=\"\/blog\/wp-content\/uploads\/2007\/07\/randcircles_01.swf\" \/>\n\t<!--[if !IE]>-->\n\t<object\ttype=\"application\/x-shockwave-flash\"\n\t\t\tdata=\"\/blog\/wp-content\/uploads\/2007\/07\/randcircles_01.swf\"\n\t\t\tname=\"fm_randcircles_01_406724978\"\n\t\t\twidth=\"500\"\n\t\t\theight=\"800\">\n\t<!--<![endif]-->\n\t\t\n\t<!--[if !IE]>-->\n\t<\/object>\n\t<!--<![endif]-->\n<\/object>\n<p><strong>*Update:<\/strong> If you'd like to see images created with code derived from the SWF examples above you can check out the <a title=\"Checkered Image Gallery\" href=\"https:\/\/www.pixelwit.com\/blog\/2007\/07\/checking-checkered-checks\/\">Checkered<\/a> and <a title=\"Circle Image Gallery\" href=\"https:\/\/www.pixelwit.com\/blog\/2007\/07\/circling-circles-circled\/\">Circle<\/a> image galleries.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Explains how to exploit Flash vector drawing techniques to create interesting textures and patterns out of overlapping shapes.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[8],"tags":[36],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-flash","tag-swfs"],"_links":{"self":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":0,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pixelwit.com\/blog\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}