[SWFObject] restricting cleanupSWF to SWF only

David de Kock david at tnmedia.nl
Tue Sep 19 07:48:00 PDT 2006


Yes, I've fooled around a bit with setting a specific classname and as
you said that resulted in more code.

I've read that the reason why MS used a different clsid is that WMP v7
object model was no longer backwards compatible with the v64 model. So
it was in fact a complete new player.
I dont expect that Adobe will do this for (near)future new Flash
players.

Bye, David 

-----Original Message-----
From: swfobject-bounces at lists.deconcept.com
[mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Geoff
Stearns
Sent: maandag 18 september 2006 21:25
To: swfobject at lists.deconcept.com
Subject: Re: [SWFObject] restricting cleanupSWF to SWF only


this is interesting... the classid seems like a quick solution...

another one might be to insert a custom class name into each object  
tag and then check for the class name before removing it.

I think the check for classid might be smaller size, though, so maybe  
i'll add this into the 2.0 code and do some tests.

anyone from adobe want to chime in on the classid ever changing in  
the future? seems like it wouldn't be a very good idea, but i know  
that windows media player changed their classid when they went from  
v6.4 to the next one up...

not really sure why though.



On Sep 18, 2006, at 2:30 PM, David de Kock wrote:

>
> In my application I'm mixing flash, wmv and qt player in the same page

> and I've noticed that on unload the cleanupSWFs also cleans my WM
> and QT
> objects. I've added one line to the cleanupSWFs function to check  
> if the
> object is Flash before cleaning up starts. I'm checking for the  
> specific
> flash classid value by the way.
>
> Here is my version of the function:
>
> deconcept.SWFObjectUtil.cleanupSWFs = function() {
>   if (window.opera || !document.all) return;
>     var objects = document.getElementsByTagName("OBJECT");
>     for (var i=0; i < objects.length; i++) {
>       if (objects[i].classid ==
> "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000") {
>         objects[i].style.display = 'none';
>         for (var x in objects[i]) {
>           if (typeof objects[i][x] == 'function') {
>           objects[i][x] = function(){};
>         }
>       }
>     }
>   }
> }
>
> I wonder if checking for classid is the smartest? This should be
> unique
> but I don't know if the classid values are likely to change when new
> flash versions in the future.
>
> Thanks,
> David
>
> PS. SWFObject rocks!
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date:
> 15-9-2006
>
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com 
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

_______________________________________________
SWFObject mailing list
SWFObject at lists.deconcept.com
http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.4/449 - Release Date:
15-9-2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.12.5/450 - Release Date:
18-9-2006
 




More information about the Swfobject mailing list