Image Image Image Image Image
Scroll to Top

To Top

fix

04

Apr
2015

News Articles

Permalink

By admin404

CropRefine WordPress Plugin

April 4, 2015 - News Articles

When an article is published in WordPress, it could likely appear across several of the internal templates, besides just the single post page. For example, you may see “Recent Articles” on the home page sidebar or footer, “Related Articles” at the bottom of other posts, and “Search Results” may show excerpts with thumbnails to help readers to quickly find relevant results. These other applications of featured images not only direct readers to the freshest content, but they also notify search indexers of changes to a WordPress sitemap. This boosts the credibility of the site and its author by showing that the site is maintained and current, and offering cross-links to promote relevance.Read More

Tags | blog, croprefine, distort, era404, featured image, fix, limitation, plugin, recrop, refine, shortcoming, thumbnail, upload, wordpress

19

Jun
2006

Information Resources

Permalink

By admin404

Activating an ActiveX Control’s Interface through Javascript

June 19, 2006 - Information Resources

Removing the Marching Ants around SWF Files

As a result of the jury decision in Microsoft’s Eolas patent lawsuit, Microsoft created an Internet Explorer update that would force users to activate media items coded with “embed”, “applet” or “object” tags. The result of this decision is that while movies may play and function correctly in Firefox, Safari and other browsers, users must click Flash media to “activate” it and accept ActiveX alerts on pages containing Quicktime media.

A solution to this obstacle has been dutifully created and promoted by Geoff Stearns. His “SWFObject” (grab it here) is a simple Javascript which enables developers to embed Flash files into sites without using “embed”, “applet” or “object”.

For instance, we used to have our home page navigation coded like this:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="796" height="72" id="nav_home" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="nav_home.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="nav_home.swf" quality="high" bgcolor="#ffffff" width="796" height="72" name="nav_home" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

With Mr. Stearns’ SWFObject, the syntax is shorter and effective. In the head, we include his Javascript file:
<script type="text/javascript" src=js/swfobject.js"></script>

And in the body, we replace the object and embed tags with this:
<div id="navcontent"></div>
<script type="text/javascript">
// <![CDATA[
var a = new SWFObject(swf/nav_home.swf", "fo_nav", "796", "72", "7,0,0,0", "#FFFFFF", true);
a.addParam("allowScriptAccess", "sameDomain");
a.addParam("quality", "high");
a.addParam("scale", "noscale");
a.write("navcontent");
// ]]>
</script>

The SWFObject allows for you to add all the parameters of Adobe’s default export using the addParam function.

To make things better, you can still pass variables to and from the Flash from PHP by adding the FLASHVARS variable with Stearns’ addParam function.

For instance, our interior navigation, with the PHP/Smarty variables, looks like this:

<div id="navcontent"></div>
<script type="text/javascript">
// <![CDATA[
var a = new SWFObject(swf/nav_home.swf", "fo_nav", "796", "72", "7,0,0,0", "#FFFFFF", true);
a.addParam("allowScriptAccess", "sameDomain");
a.addParam("quality", "high");
a.addParam("scale", "noscale");
a.addParam("FLASHVARS", "section=‹$section›")
a.write("navcontent");
// ]]>
</script>

The resourceful Stearns’ provides the identical solution for embedding Quicktime movies to eradicate Microsoft’s ActiveX alert window.

Include his QTObject Javascript file in the head of your page:

<script type="text/javascript" src="js/qtobject.js"></script>

And modify the code for your Quicktime video to use his format:
<div id="video">
<script type="text/javascript">
// <![CDATA[
var myQTObject = new QTObject("reels/web.mov", "qo_web", "480", "376");
myQTObject.write();
// ]]>
</script>
</div>

Incorporating the add.Param function for Quicktime parameters, you can easily add poster movies and controller options the same way you would in Flash:
<div id="video">
<script type="text/javascript">
// <![CDATA[
var myQTObject = new QTObject("reels/reel_web_posterMovie.mov", "qo_web", "480", "376");
myQTObject.addParam("qtsrc", "reels/reel_web_posterMovie.mov");
myQTObject.addParam("href", "reels/web.mov");
myQTObject.addParam("target", "myself");
myQTObject.addParam("controller", "false");
myQTObject.write();
// ]]>
</script>
</div>

Recommended Links

SWFObject Download (zip)
QTObject Download (zip)
SWFObject Documentation
QTObject Documentation

Tags | activate flash, adobe, citarella, fix, fla, flash object, html, issue, macromedia, microsoft activex, patch, php, problem, quicktime embed, swf, swf object