It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Display a message when Flash is not found on the iPad?

Display a message when Flash is not found on the iPad?

Postby flashdev01 on Fri Aug 26, 2011 12:36 am

Apple is obviously rejecting Flash to protect it's 'App' revenue. I've been on Android phones that run Flash and display all my content perfectly smooth. It can be quite frustrating how they are trying to bury it when I still have yet to see HTML5 replicate the type of interactive content Flash is capable of producing.

Is there any way to display a message on the iPad when the Flash player is not found?
I'd like it to says something along the lines of:
"Unfortunately the Apple iPad does not support the Flash player because their business interests do not want it taking away from their App revenue.
Did you know that the Dell Streak, HTC Flyer, Blackberry Playbook, Motorola Xoom, Samsung Galaxy Tab, Toshiba Thrive, and HP Touchpad all support the Flash player?"



My HTML code looks something like this...

<html>
<head>
<title>My Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#ECECEC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<body onresize="setFlashSize()">
<div id="flashid" style="width:100%; height:100%;">
<script type="text/javascript" language="JavaScript">


function setFlashSize(){
var viewportheight = document.body.clientHeight;
var viewportwidth = document.body.clientWidth;
var mydiv = document.getElementById("flashid");
var styleheight = parseInt(mydiv.style.height);
var stylewidth = parseInt(mydiv.style.width);

if (viewportwidth<880){
document.getElementById("flashid").style.width = 880+"px"; }
else {
document.getElementById("flashid").style.width = 100+"%";}

if (viewportheight<760){
document.getElementById("flashid").style.height = 760+"px"; }
else {
document.getElementById("flashid").style.height = 100+"%";}

}



setFlashSize();
document.write('<object data="index1.swf" width="100%" height="100%" type="application/x-shockwave-flash">');
document.write('<param name="movie" value="index1.swf" />');
document.write('<param name="allowScriptAccess" value="always" />');

document.write('</object>');
</script>
<noscript>Javascript must be enabled to view Flash movie</noscript>
</div>
</body>
</html>
flashdev01
 
Posts: 2
Joined: Fri Aug 26, 2011 12:30 am

Re: Display a message when Flash is not found on the iPad?

Postby flashdev01 on Fri Aug 26, 2011 5:07 am

Solved!
turns out I could just apply
document.write('<center><IMG SRC="alert.jpg" WIDTH="585" HEIGHT="195"></center>');
between my object tags at the bottom of my html.

If the plugin does not initialize it brings up the alert.jpg
flashdev01
 
Posts: 2
Joined: Fri Aug 26, 2011 12:30 am


Who is online

Users browsing this forum: No registered users and 8 guests