PDA

View Full Version : iPad HTML Code + Flash Splash Page


kremo5le
06-02-2010, 06:27 PM
Hello there,

My client wants his home page, which is a splash page, to say something when an iPad user see his website. Why? Right now the page uses Flash and as everyone knows, iPads don't run Flash animations.

What would be the code to add to accomplish this? :confused:

Thank you!

edbr
06-03-2010, 01:23 AM
you would first need a browser detect script i use php but there are javascript. in php i then use a conditional statement. other than that using swfobject you can add an alternative if flash cant load

kremo5le
06-03-2010, 01:43 AM
other than that using swfobject you can add an alternative if flash cant load

Thank you for your reply!

Could you be more detailed? I can Google browser detect PHP scripts, but what about the second thing you mentioned (what's quoted)?

kremo5le
06-03-2010, 01:47 AM
What about this? http://davidwalsh.name/detect-ipad

domedia
06-03-2010, 01:52 AM
Yes, what about it? :)
Does it work?

edbr
06-03-2010, 02:03 AM
usin swfobject you can do this
<div id="flashcontent">



<img src="images/general/image.jpg" />
</div>
<script type="text/javascript">
// <![CDATA[

var so = new SWFObject("images/flash.swf", "movie", "350", "300", "9.0.0","scripts/expressInstall.swf");
so.addParam("wmode", "transparent");
so.useExpressInstall('expressinstall.swf');
so.write("flashcontent");

// ]]>
</script>
of course you can simply display text if you rather

Corrosive
06-03-2010, 06:31 AM
Just a general question out of interest but what is the iPad programmed to say when you visit a flash site anyway? Does anyone know?

edbr
06-03-2010, 07:02 AM
Steve Jobs for president i think

davidj
06-03-2010, 01:13 PM
Just a general question out of interest but what is the iPad programmed to say when you visit a flash site anyway? Does anyone know?

you just get a space where the flash goes

no propaganda or anything

Jobs is championing flashes demise like I am championing the official death of IE6

Its obvious that he doesnt want an application layer running on the apple platform outside of the apps store and he wants total control over his product, with no 3rd party calling even the smallest of shots.

My experience of HTML 5 video is poor. Its very slow and buggy!

kremo5le
06-14-2010, 08:54 PM
Hello everyone,

I'm sorry for the late reply. I finally found the way to get it to work. Basically, if you follow the instructions on the link (http://davidwalsh.name/detect-ipad) I provide on a post above, you should be fine. This guy shows you how to do it with PHP and JavaScript. It is really simple and there's no way you can get it wrong. Also, if you have a WordPress blog, you can use this plugin (http://wordpress.org/extend/plugins/iphone-webapp-umleitung/) to get it to work.

Finally, how do you test it if you don't have an iPad? Very simple! Follow the instructions provided by Apple (http://developer.apple.com/safari/library/technotes/tn2010/tn2262/index.html), and you will be golden!

I hope this helps all of you looking for this solution.

Take care,

kRem