A very useful application except I haven't been able to get the Alternative HTML function working and am uncertain if its broke or I'm just not understanding (or both).

With Module and SWFObject installed and working....
In Drupal's Configuration.. below the HTML Aternative entry box accessed through the Administration/SWF Tools/Embedding Settings HTML menu
there is a statement that reads:

The ID for for excluding or including this element is: edit-swftools-html-alt - the path is: admin/media/swf/embed

I am assuming that is supposed to inform me how to use the feature. For me this is not clear. Could someone provide an example of how this is called in actual application.

Thanks,
Mark

Comments

andykemp’s picture

I have used this once in the following way

$randomimage = "ALTERNATE HTML";
print swf_list($playlist, "950x160", array('transition'=>'random','rotatetime' => '5'), array('html_alt'=>"$randomimage"));

Hope this is helpful!

mwpeters’s picture

This isn't really using the HTML alternative function supplied through the Drupal menus and I still don't understand how it is intended to be used (I'm kinda taking wild guesses).

Maybe a different approach would get the result I'm after faster though.

The code you're showing appears to use a different approach to swf movies than the call than the swfobject embedding technique. Not sure that would be wise for me.

It's funny as I can get it swfobject to work fine on its own using the technique of assigning an image to the enclosing block. I haven't gotten that to work within Drupal though. Everything I tried gives me know alternate image or two images.

Hmm, maybe I can use a swf embed var to align the movie over the replacement image in the ?.
The documentation refers to browser window, but might function within the .

mwpeters’s picture

Partially my ignorance on how to use I this I guess.
My immediate problems were resolved by switching to direct embedding and creating and applying CSS.

I still don't understand how to use HTML alternative settings though...or how I might use UFO or jQuery...
And I hope to use this more, so additional info would be much appreciated.

sime’s picture

I'm confused about the original question. The lastest version of swftools (at admin/media/swf/embed) doesn't show any "ID for excluding or including..." type option.

Perhaps you can check your version, confirm the url and/or show a screenshot.

The two methods for using alternative html are 1) entering it in that admin page or 2) override it case-by-case as demonstrated by andykemp.

DerekAhmedzai’s picture

I've used this method to display plain text fallback content:

<swf file="flash-movie.swf" width="300" height="200" othervars="html_alt=Plain text alternative content">

The advantage over andykemp's method is that you can use a Filtered HTML input format, rather than having to use PHP code.

It works when using UFO to embed the Flash movie - I haven't tried it with any other embedding options though.

Stuart Greenfield’s picture

Status: Active » Fixed

edit-swftools-html-alt sounds like the identifier for the entry box, so I am guessing you used a WYSIWYG editor. If you use FCK editor you can prevent it from attaching to text input areas by adding these id's to an exclusion list.

In terms of using the HTML ALT, you simply add the text that you want substituting, and hit save. Then, if the js can't run on a page you will see the ALT text in its place.

That's all there is to it.

Setting to fixed, but post again if this didn't help.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

roball’s picture

Title: Embedding - HTML alternative » Document how to add custom embedding HTML alternatives
Version: 5.x-1.1 » 6.x-3.0-beta5
Component: SWF Tools » Documentation
Category: support » feature
Status: Closed (fixed) » Active

Since this feature isn't really documented anywhere, I want to clarify how to add custom HTML alternatives via the "SWF Tools filter" filter, using the latest 6.x-3.x version, and asking to add that information to the official documentation. I am using the "Direct embedding" embedding method and have the SWF Tools filter enabled in the "Full HTML" input format, so no PHP is required.

1. At "Administer › Site configuration › SWF Tools › Embedding settings" (admin/settings/swftools/embed) change the "Override of HTML alternative via the input filter" radio button setting from "Disabled (recommended)" to "Enabled".

2. In the node that you are going to edit via the SWF Tools filter-enabled input format (in my case "Full HTML"), add the following code:

[swf file="img/my_animation.swf" html_alt="My custom HTML alternative"]

That's it. In browsers not supporting swf animations (like iOS browsers - eg. on the iPhone) you will see "My custom HTML alternative" instead of the default "You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly." alternate HTML string. No othervars="..." needed - just directly specify html_alt="...".

This allows to use HTML instead of a plain text message as the custom HTML alternative. For example, to display an image when the Flash animation cannot be viewed, something like this works:

[swf file="img/my_animation.swf" html_alt="<img src='/sites/mysite.tld/files/img/my_alternative_image.jpg' alt='Image alternative text here' width='600' height='250' />"]

Hope that helps others!