'_s.o._createSound' [undefined] ??
Where is the _s.o._createSound function? And why would I get a:
'_s.o._createSound' [undefined] is not a function.
'_s.o._createSound' [undefined] is not a function.
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The company marked this question as answered.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hey alosii,
With the latest update of SM2 I changed some of the names in the code to save bytes and prevent potential conflicts with other peoples' code - so "this" within the SoundManager object became "_s", as one example. What you're seeing is really the same as:
'soundManager.o._createSound' is not a function.
In your case, this is the part of SM2's code where the error is firing:
if (_s.flashVersion==8) {
_s.o._createSound(_tO.id,_tO.onjustbeforefinishtime);
} else {
_s.o._createSound(_tO.id,_tO.url,_tO.onjustbeforefinishtime,_tO.usePeakData,_tO.useWaveformData,_tO.useEQData,_tO.isFLV);
};
I suspect _s is undefined when you are trying to call it, or the flash part of SM2 is not ready / has not loaded yet which would mean _s.o is undefined. Are you waiting for soundManager.onload() to fire before making calls to createSound()? Does the SM2 project page and the demos work OK, or is it just your project that is having this error?
If you have a URL you can share which reproduces this error (or some code), that'll help in troubleshooting.
I’m confident
1 person says
this answers the question
-
Inappropriate?Thankyou for answering. Actually this (http://getsatisfaction.com/schillmani...) fixed my problems. Turns out I needed a "lazy loading" to wait for the onload method as you described.
I’m thankful
1 person says
this answers the question
-
Inappropriate?In fact we were having a similar issue for a long time and couldn't figure it out - all of the mentioned things we did, nothing helped. Guess what, it was a stack/focus issue!
Simply wrapping the createSound calls that happen directly with some other crazy DOM and focus action with setTimeout(function() {}, 0); solved the hole issue. Arguably it's not beautiful, but I couldn't figure out another way.
Another note: It was only happening on Firefox!
I’m relieved
-
Inappropriate?Actually, I was reacting too early :/ It was looking good, but it seems to have been a coincidence. It is still happening with timeouts, although sometimes it fixes or delays the issue. Having a timeout greater than 0 is really no option, which means we seem to need to refrain to another plugin if we can't find a solution asap :/
Scott, if you have any additional ideas (this *only* concerns Firefox as it seems), please let me know!
Thanks,
Paul
I’m frustrated
-
Inappropriate?Hmm. Any chance _s is being defined in your scope, and thus isn't local to SM2? I would check _s and see what it actually is in your case where the error is firing. Make sure you aren't defining _s locally in whatever your app is, or try fixing the scope eg. using .apply(soundManager) or some such.
Also, make sure that SM2 is starting up OK and correctly - eg., onload() is reached without errors, etc. I'm sure you have this part covered, but I'm mentioning it just in case. ;)
Given it's Firefox-only, I wonder if you are somehow destroying and re-loading the flash movie, which would also destroy the "link" between JS and Flash. Any chance you are setting overflow:hidden on the body, innerHTML to the SM2 container or its parent nodes which would cause it to be re-written/re-initialized, display:none, etc.? Anything that might show/hide the flash movie and cause it to re-load will break SM2.
I might also try setting soundManager.useHighPerformance = false if it's currently on, as another possibility, where SM2 will then not use position:fixed on the flash movie/container (this can sometimes cause issues.)
Debug output would be handy, a live demo URL even better!
-
Inappropriate?Hi Scott,
thanks a lot for the quick feedback! _s is definitely undefined everywhere else, and the soundManager is starting up normally, all with onload etc.
I've also checked if there is any chance the Flash is reloading - at least, it is definitely not happening by rewriting innerHTML or something. However, I recall some alpha users had issues when a jQuery UI overlay popped up - afterwards, all sound was broken. Might this be related to overflow hidden? And why would overflow hidden cause a refresh in Flash?
In the meantime, I was curious and tried three different flash/sound bridges, including jPlayer and Niftyplayer. Funny enough, all of them share the exact same issue. At some point in time during the app, the actual
I’m confident
-
Inappropriate?Ah-ha. Yes, highly likely this is the result of settig overflow:hidden on the body or another element which contains the flash movie.
What happens in this case is that the flash movie "disappears" when made invisible via overflow:hidden etc., and then reloads when overflow is restored. I chalk this behaviour up to the way the browser treats elements which are out of view; it is a bit odd, non-intuitive and confusing when you are trying to debug this sort of thing.
A similar issue is seen with elements using position:absolute and wmode anything other than opaque (as far as I recall), where the movie will not load until scrolled into view. I forget exactly which conditions cause this, but you get the idea; it's not awesome.
Basically when doing things with JS that may affect the display or positioning of the flash movie (or its immediate parents), you need to be careful to test that the movie isn't being hidden and subsequently reinstantiated/reloaded. You may not see the SWF being re-requested, but you are more likely to see the SWF call out to JS with the initial ExternalInterface call (to SM2.)
-
Inappropriate?Thanks Scott, unfortunately nothing helped :/ I prepared a demo for you and sent it via email - here's an excerpt of the mail for history purposes in this thread:
I now debugged even more and confirmed that it was none of the obvious or not so obvious issues - overflow hidden
isn't being set, the embed container is always visible, and I additionally set its z-index to a high value.
Additional details: Open in Firefox 3.5 and watch for an error in Firebug. It will use createSound three times within the
onload handler, then wait until some JSON calls are done and then, the first call *always* fails (or in some other setups
the first play call when you hit the "Start/Continue" button). I tried to disabled literally everything that was happening
during the onload handler and the rest, but didn't change anything.
I’m anxious
-
Inappropriate?If someone else has the same issue, after countless hours of debugging and a lot of great assistance from Scott (thanks!), I was finally able to spot the issue:
body { display: table; }
This single line causes constant refreshes on the Flash after any DOM manipulation, it is a nightmare to debug and work with. Hope this helps!
I’m thankful
1 person says
this answers the question
Loading Profile...



EMPLOYEE
