removeCallback Error unloading SoundManager
When leaving a page in IE7 that uses Soundmanager 20081005, there is an error: "Object doesn't support this property or method". If I go in to debug, the guilty line looks to be:
__flash__removeCallback(document.getElementById("sm2movie"), "_destroySound");
No errors in FF or Chrome.
__flash__removeCallback(document.getElementById("sm2movie"), "_destroySound");
No errors in FF or Chrome.
3
people have this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
The company has acknowledged this problem.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?An interesting find; thanks. Looks like Flash's wacky ExternalInterface javascript is cleaning up after itself, possibly when SM2 may have already disconnected some of the methods or events from the soundManager object (and possibly the movie.)
I also have SM2 set up so it self-destructs when the page is unloading, removing methods from the core soundManager object and so on. Originally I had set up SM2 to self-destruct at window.onbeforeunload(), but then I moved it to window.onunload() to be more conservative. Perhaps this is related, perhaps not. I'll investigate and follow up if I have anything worthy to report.
I’m hmm.
-
Inappropriate?I've been trying to reproduce this problem with the latest version, both Flash 8 and 9 versions - I'm going to double-check this - and I haven't been able to get an error to come up at page unload time. I have the MS JS script debugger installed ("do you wish to debug?", etc.) and haven't been able to get it to barf with an error yet.
Are you seeing it on the main SM2 project page, or one of the demos after taking a few actions? Can you list the steps to reproduce it? Thanks!
I’m curious
-
Inappropriate?I've been doing some testing. I am using Mootools 1.11 and soundManager together and the 2 together causes the error. If I remove the Mootools library the error no longer pops up.
I’m retarded
-
Hm, interesting! Thanks for the note, I wouldn't have come across this in my own testing. -
Inappropriate?Upon further testing, it's the Garbage collection piece of Mootools that's causing the error (it also executes before unload). I think it's removing the "sm2movie" element (the flash object) so SoundManager can't find it to remove it (I'm not 100% sure, but it at least sounds good).
I’m ?
-
Inappropriate?I didn't get to this with the latest release, but I can try looking at checking for existence of the movie before attempting to remove it on my end. That may help with the errors.
The one you posted originally sounds like something Flash is doing, perhaps mootools is conflicting with Flash and ExternalInterface. SM2 does not call any "removeCallback" functions, that one looks to be part of the ExternalInterface functions which Flash adds to Javascript (yep, it's kind of wacky.)
I’m hmmm.
-
Inappropriate?Sorry, I forgot to check back for a while.
As with matt, I'm also using MooTools 1.11, and no, I don't have this issue on the SM2 project page.
A quick and dirty fix that I've done, for my specific application, is to not allow elements containing OBJECT tags to be pushed onto MooTools garbage collection stack (modified Garbage.collect). I think I can live with this until my migration to jQuery is complete.
I’m unsure
1 person says
this solves the problem
Loading Profile...



EMPLOYEE