Categories
General

How to ensure that your Flash component appears where you want it to

Well, that is really impossible.

Let’s go over the basic scenario: You create a Flash movie or component to place on your page. You compile that movie from its native FLA format to the ‘executable’ SWF file. You then place the component into your html page using the object and embed tags, something like this:

<object … >

< param name="movie" value="http://somedomain.com/flash.swf" />


The problem is – anyone can take look at the source code of your page, take the object tag, copy it and have YOUR component be displayed on THEIR site. Your server will keep on hosting it, but the only way to find out if this actually happened is to have the Flash file check the browser’s location through a JavaScript call. Still, if scripting is disabled (one of the parameters in the Flash object tag controls that), the movie cannot really ‘know’ where it is playing. The only measure left for you is to disable the movie from working if you cannot get information on the host page.

I do not know about you, but this is a rather big issue if you care where your work is being used.

Share
Categories
General

Safari Issues, part 1

After working on ensuring the site I am developing for my current project is compliant with Safari, I collected a bunch of experiences that I should share for posterity. Most of them have to do with the fact that Safari, based on the same KTML browser core as the KDE project’s Konqueror browser, seems to never have improved on the original KTML version’s JavaScript engine, while Konqueror did. Safari, like a slab of rock and a chisel, is still eons ahead of Opera, but that’s a different story.

So, let’s bitch about Safari.

The problem I had with Safari today has to do with the fact that in order to save a lot of unnecessary code specifying onclick events, I am instead assigning the events to links on the page dynamically when the page loads. For example, what I do is iterate over the links in a table, and then assign them a function to be called when they are clicked:

var tableLinks = myTable.getElementsByTagName(“a”);
for(var x=0; x < tableLinks.length; x++) { tableLinks[x].onclick = function() { doSomething(); }; } When certain conditions are met, I want to assign a different event handler function to one of these links, which I assign the same way: link.onclick = function() { doSomethingElse() }; But with Safari, no. Once you set one event on a link, it is there to stay. Boo freakin' hoo. Apple support pages proclaim the standards compliance but for real action, give me IE over Safari anyday. If you are lucky enough to use an Apple machine, just use Firefox. (This will be my standard endnote for every Safari bitch. I know you care.)

Share
Share