Flash object for desktops but not mobiles.

Reaction score
2
Location
Queensland Australia
I have a flash object I want to have displayed on laptop and desktop browsers but have it replaced by a simple html alternative when viewed from a mobile phone, tablet or iPad.

What would be the best way to do this? I'm guessing some sort of responsive layout, but am wondering if there is perhaps another way. Can anyone please explain how they would make this work?
 
You may not want to hear this (but I bet I'm not alone) – I'd work it out so there is no requirement for Flash at all. Can you really not do it in HTML5?
 
I concur, avoid Flash like the fire. There is a reason why google doesn't support it anymore, neither are hundreds of other developers.
 
There is a way. Usually you would pass some Javascript to determine the "User Agent" (Google That) and then the script can display the page accordingly.

I agree with the others, go HTML5 - you had better be a web dev or very competent to get the Javascript stuff going correctly.

Check THIS SITE for some code examples
 
No need for Javascript, just use CSS @media queries to serve content appropriate to the viewport size. Then the responsive effect works with a small browser window on a large screen, too.

If you're new to responsive web design, experiment with the Skeleton grid.
 
Thanks NJW, had never thought of using @media in css to achieve it. Probably quicker and easier to implement. To be honest its just a small community project that I'm helping out with, I'm charging for the hosting but not for building the site so I set them up with a WordPress site and the default TwentyFifteen Theme. Aside from a few simple changes I'm not wanting to spend much time doing anything complicated.
What I was wanting to show was a third party weather widget thing that shows the reading from a weather station that one of the locals has mounted on his house. However like I said there is a more basic html version, and I think I'll stick with that.
 
Back
Top