{"id":1871,"date":"2010-11-15T10:25:00","date_gmt":"2010-11-15T10:25:00","guid":{"rendered":"http:\/\/mts-help.nick.php.dev\/after_sale_support\/Working_with_Flash\/Advanced\/article12.html"},"modified":"2016-05-12T08:43:58","modified_gmt":"2016-05-12T12:43:58","slug":"skipping-flash-header-animation-certain-pages","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/skipping-flash-header-animation-certain-pages.html","title":{"rendered":"Skipping flash header animation on certain pages"},"content":{"rendered":"<span class=\"question\">Q:<\/span> How can I make a flash header play full animation on certain pages only but skip it on the rest of the pages?\r\n\r\n<span class=\"answer\">A:<\/span> In the HTML code of our templates you&#8217;ll find one of the following two blocks of code: <span class=\"answer_text\"> <\/span>\r\n\r\nThe 1st one (you&#8217;ll find in our earlier templates):\r\n<div class=\"example_code\">&lt;object classid=&#8221;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#8243; codebase=&#8221;http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,29,0&#8243; width=&#8221;880&#8243; height=&#8221;800&#8243;&gt;\r\n&lt;param name=&#8221;movie&#8221; value=&#8221;flash\/header.htm&#8221;&gt;\r\n&lt;param name=&#8221;quality&#8221; value=&#8221;high&#8221;&gt;\r\n&lt;param name=&#8221;menu&#8221; value=&#8221;false&#8221;&gt;\r\n&lt;embed src=&#8221;flash\/header.htm&#8221; quality=&#8221;high&#8221; pluginspage=&#8221;http:\/\/www.macromedia.com\/go\/getflashplayer&#8221; type=&#8221;application\/x-shockwave-flash&#8221; width=&#8221;880&#8243; height=&#8221;800&#8243;&gt;&lt;\/embed&gt;\r\n&lt;\/object&gt;\r\n\r\n<\/div>\r\nThe 2nd one:\r\n<div class=\"example_code\">&lt;object classid=&#8221;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#8243;\r\n\r\ncodebase=&#8221;http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,29,0&#8243; width=&#8221;745&#8243; height=&#8221;328&#8243;&gt;\r\n\r\n&lt;param name=&#8221;movie&#8221; value=&#8221;flash\/Header.htm&#8221;&gt;\r\n\r\n&lt;param name=&#8221;quality&#8221; value=&#8221;flash\/header.htm&#8221;&gt;\r\n\r\n&lt;param name=&#8221;menu&#8221; value=&#8221;false&#8221;&gt;\r\n\r\n&lt;param name=&#8221;wmode&#8221; value=&#8221;transparent&#8221;&gt;\r\n\r\n&lt;!&#8211;[if !IE]&gt; &lt;&#8211;&gt;\r\n\r\n&lt;object data=&#8221;flash\/Header.htm&#8221; width=&#8221;745&#8243; height=&#8221;328&#8243; type=&#8221;application\/x-shockwave-flash&#8221;&gt;\r\n\r\n&lt;param name=&#8221;quality&#8221; value=&#8221;flash\/header.htm&#8221;&gt;\r\n\r\n&lt;param name=&#8221;menu&#8221; value=&#8221;false&#8221;&gt;\r\n\r\n&lt;param name=&#8221;wmode&#8221; value=&#8221;transparent&#8221;&gt;\r\n\r\n&lt;param name=&#8221;pluginurl&#8221; value=&#8221;http:\/\/www.macromedia.com\/go\/getflashplayer&#8221;&gt;\r\n\r\nFAIL (the browser should render some flash content, not this).\r\n\r\n&lt;\/object&gt;\r\n\r\n&lt;!&#8211;&gt; &lt;![endif]&#8211;&gt;\r\n\r\n&lt;\/object&gt;\r\n\r\n<\/div>\r\nYou should put a parameter into Flash with the help of one of these blocks of code. In the .FLA file there should be an Action Script code that will accept this parameter and handle it. To add parameters do the following:\r\nIn the first case update the code in this way:\r\n<div class=\"example_code\">&lt;object classid=&#8221;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#8243; codebase=&#8221;http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,29,0&#8243; width=&#8221;880&#8243; height=&#8221;800&#8243;&gt;\r\n\r\n&lt;param name=&#8221;movie&#8221; value=&#8221; <span style=\"font-weight: bold;\">flash\/header.swf?par=skip<\/span>&#8220;&gt;\r\n\r\n&lt;param name=&#8221;quality&#8221; value=&#8221;high&#8221;&gt;\r\n\r\n&lt;param name=&#8221;menu&#8221; value=&#8221;false&#8221;&gt;\r\n\r\n&lt;embed src=&#8221; <span style=\"font-weight: bold;\">flash\/header.swf?par=skip<\/span>&#8221; quality=&#8221;high&#8221; pluginspage=&#8221;http:\/\/www.macromedia.com\/go\/getflashplayer&#8221; type=&#8221;application\/x-shockwave-flash&#8221; width=&#8221;880&#8243; height=&#8221;800&#8243;&gt;&lt;\/embed&gt;\r\n\r\n&lt;\/object&gt;\r\n\r\n<\/div>\r\nIn the second case update it in this way:\r\n<div class=\"example_code\">&lt;object classid=&#8221;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#8243; codebase=&#8221;http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,29,0&#8243; width=&#8221;745&#8243; height=&#8221;328&#8243;&gt;\r\n\r\n&lt;param name=&#8221;movie&#8221; value=&#8221;flash\/Header.htm&#8221;&gt;\r\n\r\n&lt;param name=&#8221;quality&#8221; value=&#8221; <span style=\"font-weight: bold;\">flash\/header.swf?par=skip<\/span>&#8220;&gt;\r\n\r\n&lt;param name=&#8221;menu&#8221; value=&#8221;false&#8221;&gt;\r\n\r\n&lt;param name=&#8221;wmode&#8221; value=&#8221;transparent&#8221;&gt;\r\n\r\n&lt;!&#8211;[if !IE]&gt; &lt;&#8211;&gt;\r\n\r\n&lt;object data=&#8221;flash\/Header.htm&#8221; width=&#8221;745&#8243; height=&#8221;328&#8243; type=&#8221;application\/x-shockwave-flash&#8221;&gt;\r\n\r\n&lt;param name=&#8221;quality&#8221; value=&#8221; <strong>flash\/header.swf?par=skip<\/strong>&#8220;&gt;\r\n\r\n&lt;param name=&#8221;menu&#8221; value=&#8221;false&#8221;&gt;\r\n\r\n&lt;param name=&#8221;wmode&#8221; value=&#8221;transparent&#8221;&gt;\r\n\r\n&lt;param name=&#8221;pluginurl&#8221; value=&#8221;http:\/\/www.macromedia.com\/go\/getflashplayer&#8221;&gt;\r\n\r\nFAIL (the browser should render some flash content, not this).\r\n\r\n&lt;\/object&gt;\r\n\r\n&lt;!&#8211;&gt; &lt;![endif]&#8211;&gt;\r\n\r\n&lt;\/object&gt;\r\n\r\n<\/div>\r\nFrom the ActionScript code this parameter will be available as <span style=\"font-style: italic; font-weight: bold;\">_root.par<\/span> . It means that you can use conditions like this:\r\n<div class=\"example_code\">if(_root.par == &#8220;skip&#8221;){\r\n\r\n\/\/your code here\r\n\r\n\/\/you usually use gotoAndStop(); or gotoAndPlay(); functions to skip a certain number of frames\r\n\r\n}\r\n\r\n<\/div>\r\nIn real situations you will usually incorporate this condition into the code for the preloader. The code for the preloader can look like this one:\r\n<div class=\"example_code\">onClipEvent (load)\r\n{\r\n\r\ntotal = _root.getBytesTotal();\r\n\r\n}\r\n\r\nonClipEvent (enterFrame)\r\n{\r\n\r\nloaded = _root.getBytesLoaded();\r\n\r\npercent = int(loaded\/total*100);\r\n\r\ntext = percent+&#8221;%&#8221;;\r\n\r\ngotoAndStop(percent);\r\n\r\nif ((loaded == total) &amp;&amp; (_root.par == &#8220;skip&#8221;))\r\n{\r\n\r\n_root.gotoAndStop(200); \/\/ usually the frame number where animation finishes\r\n\r\n} else if (loaded == total) {\r\n\r\n_root.gotoAndPlay(2);\r\n}\r\n\r\n}\r\n\r\n<\/div>\r\n<a class=\"link3\" href=\"javascript:Block();\"><\/a>\r\n<span style=\"font-weight: bold;\">See also:<\/span>","protected":false},"excerpt":{"rendered":"<p>Q: How can I make a flash header play full animation on certain pages only but skip it on the rest of the pages? A: In the HTML code of our templates you&#8217;ll find one of the following two blocks of code: The 1st one (you&#8217;ll find in our earlier templates): &lt;object classid=&#8221;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&#8243; codebase=&#8221;http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,29,0&#8243; width=&#8221;880&#8243; [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[355,279],"tags":[523,486,524],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/1871"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=1871"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/1871\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=1871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=1871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=1871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}