{"id":493,"date":"2011-02-02T06:54:25","date_gmt":"2011-02-02T10:54:25","guid":{"rendered":"http:\/\/www.searchenginegenie.com\/web-design-blog\/?p=493"},"modified":"2011-02-22T05:29:55","modified_gmt":"2011-02-22T09:29:55","slug":"3d-views-of-earth-using-flash","status":"publish","type":"post","link":"https:\/\/www.searchenginegenie.com\/web-design-blog\/3d-views-of-earth-using-flash\/","title":{"rendered":"3D Views of earth using flash"},"content":{"rendered":"<p><span style=\"color: #333333;\">1. Open a new document in flash in the size of 700X500 pixels.<\/span> <span style=\"color: #333333;\"><a name=\"imageclose-494\"><div class=\"lb-album\"><a href=\"#image-494\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/02\/Views-of-earth-using-flash-1.jpg\" alt=\"Views-of-earth-using-flash-1\" class=\"aligncenter size-full wp-image-516\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-494\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-494\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/02\/Views-of-earth-using-flash-1.jpg\" alt=\"image-494\">\r\n                   <\/div><\/a> <\/span><span style=\"color: #333333;\">10. In layer-6,\u00a0 key-frame-1 write the following action-script.<\/span> <span style=\"color: #333333;\"> <em>targetSpeed=0;<\/em><\/span> <em><span style=\"color: #333333;\">speed=0;<\/span><\/em> <em><span style=\"color: #333333;\">zoom=0;v<\/span><\/em> <em><span style=\"color: #333333;\">mc_movie._Xscale=78;<\/span><\/em> <em><span style=\"color: #333333;\">mc_movie._Yscale=78;<\/span><\/em> <em><span style=\"color: #333333;\">mc_movie._x=mc_movie._width;<\/span><\/em> <em><span style=\"color: #333333;\">startX=mc_movie._x;<\/span><\/em> <em><span style=\"color: #333333;\">startScale=mc_movie._Xscale;<\/span><\/em> <em><span style=\"color: #333333;\">guides._visible=false;<\/span><\/em> <span style=\"color: #333333;\">11. Select the layer-1 image and convert to movieclip then name it as <em>mc_movie<\/em>. Select the <em>mc_movie<\/em> and press F9 to write the following script.<\/span> <span style=\"color: #333333;\">o<em>nClipEvent (keyDown) {<\/em><\/span> <em><span style=\"color: #333333;\">keyPressed=Key.getCode();<\/span><\/em> <em><span style=\"color: #333333;\">if (keyPressed == Key.SHIFT) {<\/span><\/em> <em><span style=\"color: #333333;\">_parent.zoom=1;<\/span><\/em> <em><span style=\"color: #333333;\">} else if (keyPressed = Key.CONTROL) {<\/span><\/em> <em><span style=\"color: #333333;\">_parent.zoom=-1;<\/span><\/em> <em><span style=\"color: #333333;\">}<\/span><\/em> <em><span style=\"color: #333333;\">}<\/span><\/em> <em><span style=\"color: #333333;\">onClipEvent (keyUp) {<\/span><\/em> <em><span style=\"color: #333333;\">if (_parent.zoom &lt;&gt;0) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 _parent.zoom=0;<\/span><\/em> <em><span style=\"color: #333333;\">}<\/span><\/em> <em><span style=\"color: #333333;\">onClipEvent (enterFrame) {<\/span><\/em> <em><span style=\"color: #333333;\">zoom=_parent.zoom;<\/span><\/em> <em><span style=\"color: #333333;\">if (zoom&lt;&gt;0) {<\/span><\/em> <em><span style=\"color: #333333;\">if ( (zoom==1 and this._xScale&lt;100 ) or<\/span><\/em> <em><span style=\"color: #333333;\">(zoom==-1 and this._xScale&gt;78) ) {<\/span><\/em> <em><span style=\"color: #333333;\">saveWidth=_width;<\/span><\/em> <em><span style=\"color: #333333;\">_xScale += zoom;<\/span><\/em> <em><span style=\"color: #333333;\">_yScale += zoom;<\/span><\/em> <em><span style=\"color: #333333;\">delta=(_width-saveWidth);<\/span><\/em> <em><span style=\"color: #333333;\">}<\/span><\/em> <em><span style=\"color: #333333;\">}<\/span><\/em> <em><span style=\"color: #333333;\">}<\/span><\/em> <span style=\"color: #333333;\">12. select <em>mc_movie<\/em> and give edit in place option, again change it to movieclip, and name it as <em>line_mc<\/em><\/span> <span style=\"color: #333333;\">13. Now create one layer above the<em> line_mc<\/em> and press F9 then write the following:<\/span> <span style=\"color: #333333;\"><em>line_mc._x=-line_mc._width+0.1;<\/em><\/span> <span style=\"color: #333333;\"><em>duplicateMovieClip (line_mc, &#8220;strip2&#8221;,1);<\/em><\/span> <span style=\"color: #333333;\"><em>strip2._x=0; <\/em><\/span> <span style=\"color: #333333;\"><em>strip2._y=line_mc._y;<\/em><\/span> <span style=\"color: #333333;\"><strong>Press Ctrl+Enter to run the program.<\/strong><em> <\/em><\/span> <span style=\"color: #333333;\"> <\/span> <object id=\"test\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"700\" height=\"500\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"src\" value=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/02\/3D-views-of-place-using-flash.swf\" \/><param name=\"name\" value=\"test1\" \/><embed id=\"test\" type=\"application\/x-shockwave-flash\" width=\"700\" height=\"500\" src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/02\/3D-views-of-place-using-flash.swf\" name=\"test1\"><\/embed><\/object><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Open a new document in flash in the size of 700X500 pixels. 10. In layer-6,\u00a0 key-frame-1 write the following action-script. targetSpeed=0; speed=0; zoom=0;v mc_movie._Xscale=78; mc_movie._Yscale=78; mc_movie._x=mc_movie._width; startX=mc_movie._x; startScale=mc_movie._Xscale; guides._visible=false; 11. Select the layer-1 image and convert to movieclip then name it as mc_movie. Select the mc_movie and press F9 to write the following script. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[30],"class_list":["post-493","post","type-post","status-publish","format-standard","hentry","category-flash","tag-3d-views-of-earth-using-flash-tutorial"],"_links":{"self":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/493","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":25,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/493\/revisions"}],"predecessor-version":[{"id":549,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/493\/revisions\/549"}],"wp:attachment":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/media?parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/categories?post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/tags?post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}