Posted by & filed under Developer Blog.

In December I posted an entry called Embedding Flash While Supporting Standards as an improved suggestion over the Flash Satay Method. I’ve recently been playing with objects such as Windows Media and Quick Time where the Satay Method doesn’t even begin to work. As it turns out the Gillay method works for all types of objects (and allow me to re-emphasize that it works without javascript).

Before I get too far, let me show an updated example of the Gillay method. This example will appear slightly different than the examples in my other post but reflects further discussion that took place within the comments section of that post.

<!–[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase=
"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab
#version=7,0,19,0" width="780" height="590" id="gilluminate">
<param name="movie" value="gilluminate.swf" />
<![endif]x–>
<!–[if !IE]> <–>
<object type="application/x-shockwave-flash" data="gilluminate.swf" width="780" height="590" name="gilluminate">
<!–> <![endif]–>
<param name="movie" value="gilluminate.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#2C676C" />
<p>gilluminate is mostly a showcase of things I have done, things I am doing, and things I can do. It is powered by a combination of HTML, Flash, ActionScript, XML, JavaScript, CSS and PHP and displays my recent websites and artwork.<br />You need the latest free <a href="http://www.macromedia.com/shockwave/download/download.cgi?
P1_Prod_Version=ShockwaveFlash">Flash Player Plugin</a> to view this site.</p>
</object>

Basically what is happening here is that I’m hiding the IE friendly object tag from every browser that’s not IE, and vice versa.

This same principal can be applied when "embedding" Windows Media or Quick Time movies, and probably every other type of object. Here’s an example of using the Gillay method with Quick Time:

<!–[if IE]><object classid=
"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="250" height="140" codebase="http://www.apple.com/qtactivex/qtplugin.cab
#version=6,0,2,0" standby="Loading Quick Time components…"><![endif]x–>
<!–[if !IE]> <–>
<object type="video/quicktime" data="example.mov" width="$width" height="$height" standby="Loading Quick Time components…">
<!–> <![endif]–>
<param name="controller" value="true" />
<param name="type" value="video/quicktime" />
<param name="autoplay" value="true" />
<param name="scale" value="aspect" />
<param name="BGCOLOR" value="#000000" />
<param name="target" value="myself" />
<param name="src" value="example.mov" />
<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
<a href="http://www.apple.com/quicktime/download/">Quick Time Player</a> required or <a href="#" onclick="window.close();">close this window</a> and select a different format.
</object>

This code will play the example.mov movie in Firefox, IE, Safari, and IE for Mac and will validate on the W3C website

Posted by & filed under Developer Blog.

Today I spent a few hours trying to debug a web app which uses an autosuggest similar to Google Suggest. I also had an “onBlur” on the text box that will hide the suggestions. Unlike Google Suggest, I could not limit the number of suggestions because it was suggesting names of people in the database and I can’t just list the first 10 or 15 “Johnson” names, I have to list them all. That “Johnson” list can get long enough to overflow off the page, causing a need to scroll down to see all results listed.

Although this wasn’t a problem in Firefox, Internet Explorer was causing the text box to lose focus and therefore hide suggestions whenever I clicked the scroll bar in order to view lower results. I tried Google’s page and shrunk my window enough that a scroll bar appeared, but Google’s suggestions weren’t dissapearing! What in the world is going on here? After searching through my code for something I might be doing that would cause it, I finally started just simply deleting elements from my page until it worked. It wasn’t until I deleted the Doc Type Declaration at the top of the page that it started working. I checked Google Suggest’s code, and sure enough, there is no DTD on that page.

Posted by & filed under Developer Blog.

I recently received a rather lengthy and somewhat elaborate MS Word document, which I was asked to convert to HTML for uploading to a 3rd party’s website. My first instinct was to save the Word document as HTML and use Dreamweaver’s "Clean Up Word HTML" Command. But not only did I have to leave it running all night for Dreamweaver to finish "cleaning", but the results were far from desirable in my opinion. There were still a lot of left over inline styles, etc. that Dreamweaver just plain missed.

I approached it differently this morning and just selected the entire document in Word, copied it, and then pasted it into Dreamweaver’s Design window. Not only was it much, much faster, but the output code was much, much cleaner! I didn’t have to run the "Clean Up Word HTML" Command afterwords either.

Moral of the story: If you get an HTML document that was created using Word: yes, clean it up. But if you get a Word Document and need to convert it to HTML, don’t waste your time converting it to HTML with Word and cleaning it up, just copy and paste it!

Posted by & filed under Developer Blog.

My company now has 2 web servers that I can’t log into via Dreamweaver MX 2004’s SFTP functionality. I’ve already read and re-read Macromedia’s technote on setting PasswordAuthentication to “yes” the sshd_conf file, but that doesn’t seem to be working. I can SFTP just fine via FileZilla to both servers, but when I try with Dreamweaver the logs tell me that the password is incorrect (Yes, I have verified several times that I am typing the passord correct and am checking the case). There are well over 20 other servers here that I can SFTP with DWMX2004 without any problems, but the last 2 servers they built are the only 2 having problems. I have verified that all sshd_conf settings are exactly the same as the other servers, but to no avail.

I’m at a loss and am asking for help! Even the System Admin Manager has looked into it and can’t figure anything out. PLEASE HELP!!!

Posted by & filed under Developer Blog.

PROBLEM  Today I ran into a rather perplexing bug in Flash when I tried to create/write to a shared object. I needed to create an array named after an ID and then store 3 values into that array. The idea is that each ID would have its own array with its own 3 values. Since the name of the array would depend on which ID we were dealing with, I resorted to using the set variable command in order to use a variable as the name of the array like this:

myData = sharedobject.getLocal(“myData”, “/”);
set(“myData.data.”+ID, new Array());
eval(“myData.data.”+ID)[0] = value1;
eval(“myData.data.”+ID)[1] = value2;
eval(“myData.data.”+ID)[2] = value3;

But to my dismay, not only was nothing being written to the shared object, the shared object wasn’t even being created!

SOLUTION:  The solution that I came up with isn’t great, but it works. I figured out through much trial and error that unless something else is written to the shared object without using Set Variable, Set Variable won’t work. Not only that but if you set, for example:

myPersonalData.data.test = true

you will only be able to write to the shared object a single time because next time, since myPersonalData.data.test is already set to true, nothing changes. In order to work around this I used the following solution:

myData = sharedobject.getLocal(“myData”, “/”);
myData.data.lastIDStored=ID;
set(“myData.data.”+ID, new Array());
eval(“myData.data.”+ID)[0] = value1;
eval(“myPersonalData.data.”+ID)[1] = value2;
eval(“myData.data.”+ID)[2] = value3;

The reason this works so well is because if I’m creating a new array, I’m sure the ID has never been used before and therefore will never be the last ID stored.

The problem only exists when creating a new array, not for changing the array, so if the last ID is the same as the new ID it won’t matter.