Archive for the ‘Programming’ Category

Apr
2008
26
 posted at 7:51 pm filed under: HTML

Yes, there are a lot of other tutorials on the web that show you examples of how to embed flash on a web page, but ….. it’s a lot harder to find one that shows you how to do it and still maintain W3C standards compliance.
The easy way to put flash on a page is to use an <embed>tag, which works. It’s widely supported by modern browsers, but it is not a part of the HTML 4 or xHTML 1 specifications. If your desire is to code your html pages to W3C standards, then the <embed> tag is not an option.
Here’s an example that shows a standards compliant implementation of flash that works in IE, Firefox, and Opera:


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="111" height="39">
<param name="movie" value="/three_coral_button.swf?mp3file=/04 Over You NEW.SWF"/>
<param name="quality" value="high"/>
<param name="bgcolor" value="#fffffff"/>
<!--[if !IE]><-->
<object data="/three_coral_button.swf?mp3file=/04 Over You NEW.SWF"
width="111" height="39" type="application/x-shockwave-flash">
<param name="quality" value="high"/>
<param name="bgcolor" value="#ffffff"/>
<param name="pluginurl" value="http://www.macromedia.com/go/getflashplayer"/>
Falling Forward
</object>
<!--><![endif]-->
</object>

Apr
2008
17
 posted at 10:55 pm filed under: PHP

Sometimes you just get a brain deadlock on the simplist thing. A few weeks ago I was converting some pages on a site to xhtml 1.0 strict. As you probably know, this requires each page to start with the following xml declaration:

< ?xml version="1.0" encoding="utf-8" ?>

No problem right? Wrong. That decleration is similar to the start of a php decleration:

< ?php

Needless to say it creates an error when you try to load the page. That’s where things went nuts and I was drawing a blank. “This should be easy to do” I kept saying to myself. “What am I missing”. Geesh, how stupid did I feel when it finally hit me. Here’s all you need to do. Put the following php command on the first line of the document:

echo '< ?xml version=\"1.0\" encoding=\"utf-8\"?>\n';

Just figured I’d post this in case someone else had a brain freeze as bad as the one I had.

Ramblings of a Deluded Mind
Loading...
Login
Register

A password will be mailed to you
Retrieve password

A confirmation mail will be sent to your e-mail address
AddThis Feed Button AddThis Social Bookmark Button
Contact Me
  1. (required)
  2. (valid email required)
  3. (required)
 

cforms contact form by delicious:days