Hello, I'm running a website on Drupal 7.39. My main page content has a block with a Flash .swf animation intro.

However in some platforms like mobile devices, the Flash doesn't show so... How could I have it fallback to a different block, or maybe to a different body field, with a simple HTML body or a body with HTML5 Animation? If it's too complicated with HTML5, I may simply use a static HTML fallback but... How can I implement such fallback in those cases where my Flas won't output?

I noticed this module: https://www.drupal.org/project/fallback_formatter
But it is still in Development stage and I'm afraid of adding it to my production site: http://www.artimedia.pt/

Are there any other options to achieve this?

Thanks,

Miguel

Comments

babipanghang’s picture

I think you should do it the other way around: render your HTML by default, and then let javascript determine if flash is supported. If so, replace the HTML block with your flash code using javascript.
If i read correctly, this is what swfobject does...

Did i answer your question on the forums? I love to hear a reply wether or not it worked for you!
Jaap - Acquia certified drupal site builder

ARTIMEDIA’s picture

Thank you for the idea.

I will give that a try in a short while and post here how it goes.

ARTIMEDIA’s picture

Ok, it worked. I just finished implementing it using swfobject 2.2 as you suggested.

I downloaded swfobject and replaced the default values for my own in the index.html file that comes with it. Then I uploaded expressInstall.swf and swfobject.js to the root directory of my Drupal installation and pasted my index.html code in the body field of the Block of my home page.

I'm not sure if having expressInstall.swf and swfobject.js in my Drupal root directory was necessary as it seems to be working even before I did that, but I did it anyway.