Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-03-2010, 02:07 PM   #1
terraform
Member
 
Join Date: Oct 2007
Posts: 68
Default SWFobject2 alt HTML site redirect help...

Hey all
I am still pretty new to the whole SWFObject thing
and I have this code that is working great.
but I have no idea where to put (or how to put) a link to an alt site
for pc's and devices that are not Flash enabled...

this is my current working code.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>version 3</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<script type="text/javascript" src="swfobject.js"></script>		
		<script type="text/javascript">			
			var flashvars = {};
			var params = {
				bgcolor : "#000000",
				allowFullScreen : "true",
				scale :"noscale",
				allowScriptAccess : "always",
				swLiveConnect : "true"				
			};
			var attributes = {};
			swfobject.embedSWF("preview.swf", "myContent", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
		</script>
		<style type="text/css">
            html, body, div {
                height: 100%;
                overflow: hidden;
            }
            body {
                background: #000000;
                font: 86% Arial, sans-serif;
                margin: 0;                
            }
            #main {
                height: 100%;
            }
		</style>
	</head>
	<body bgcolor="#000000">		
		<div id="myContent">
			<h1>Alternative content</h1>
			<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
		</div>
	</body>
</html>
and say I want the user to be redirected to the address below if on a iPhone
or some other thing that does not support flash.

Code:
http://www.myHTMLsite.com
terraform is offline   Reply With Quote
Old 06-03-2010, 11:59 PM   #2
tadster
tadster
 
tadster's Avatar
 
Join Date: Feb 2009
Location: Texas
Posts: 2,111
Default

simplest way is to include the link in the alt content section, something like:
Code:
...
<body bgcolor="#000000">		
		<div id="myContent">
			<h1>Flash is needed</h1>
			<p>If you do not have a Flash Player you can visit this link,
<a href='http://www.myHTMLsite.com'>html site</a><br />
for the plane html version of the site</p>
		</div>
	</body>
so if they don't have flash they will see that message and link.
__________________
www.actiontad.com - ActionScript and JavaScript sitting in a tree...
tadster is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:22 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.