{"id":114,"date":"2009-12-09T12:37:52","date_gmt":"2009-12-09T20:37:52","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=114"},"modified":"2009-12-09T12:37:52","modified_gmt":"2009-12-09T20:37:52","slug":"redirecting-to-another-page-when-flash-is-not-installed","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2009\/12\/09\/redirecting-to-another-page-when-flash-is-not-installed\/","title":{"rendered":"Redirecting to another page when Flash is not installed"},"content":{"rendered":"<p>For all you that need to redirect users to another page if they don&#8217;t have Flash installed and use swfobject, just drop this code and you&#8217;re good to go:<\/p>\n<pre class=\"brush:javascript\">var playerVersion = swfobject.getFlashPlayerVersion(); \/\/ returns a JavaScript object\nvar majorVersion = playerVersion.major; \/\/ access the major, minor and release version numbers via their respective properties\n\nif (majorVersion == 0)\n{\n document.location = '\/PAGE_THE_USER_SHOULD_BE_REDIRECTED_TO';\n}<\/pre>\n<p>This should go just before:<\/p>\n<pre class=\"brush:javascript\">swfobject.embedSWF(\"xmas\/happy_christimas_2009.swf\", \"flashcontent\", \"100%\", \"100%\", \"10\", false, flashvars, params, attributes);<\/pre>\n<p>Let me know if you have a different approach.<\/p>\n<p>I have found this (http:\/\/pastie.org\/433193 ) while searching for a solution to my problem, but it made more sense to rely on swfobject API since I was already using it to embed flash.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For all you that need to redirect users to another page if they don&#8217;t have Flash installed and use swfobject, just drop this code and you&#8217;re good to go: var playerVersion = swfobject.getFlashPlayerVersion(); \/\/ returns a JavaScript object var majorVersion = playerVersion.major; \/\/ access the major, minor and release version&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2009\/12\/09\/redirecting-to-another-page-when-flash-is-not-installed\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,23],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-flash","category-swfobject"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}