+1
Answered

vhostSwfobject is null

Eric Johannsen 11 years ago updated by Gil 11 years ago 17
In the line of your JavaScript

vhostSwfobject.embedSWF(url, vhssFlashDiv, width, height, flashVersionStr, expressInstallUrl, vhostFlashvars, vhostFlashParams, vhostFlashAttributes);

the variable vhostSwfobject is null. What might cause that, and how can I fix it?

This is happening on IE10. I was able to get a simple test program working in my environment. I get this error when attempting to integrate with my existing website.
Eric -
looking into it.
any way you can post a link to your test page where this problem might be seen?
Regards
Gil
Unfortunately, no. This is happening in my local development environment. I cannot push out to the live site with the issue unresolved. Our QA environment is not public facing.
OK - give us a day or two - we're trying to recreate the problem.
One thing of note... the line

[script type="text/javascript" src="http://vhss-d.oddcast.com/vhost_embed...]

appears in the header of the page, but the element that is meant to play the TTS animation is loaded via Ajax. The Ajax response includes this:

[div class="vAvatar"]
[script type="text/javascript"]AC_VHost_Embed(3563894, 300, 200, '', 1, 1, 2302448, 0, 1, 0, 'MY_GUID', 9);[/script]
[/div]

thought that might be relevant.
Note: Replaced angled brackets with square ones so the HTML code shows up in the forum post.
Eric -

We were able to recreate the problem on a fresh out-of-the box Win8 system. Then we updated Windows (by using normal ms update) and the problem disappeared.

Please update your Windows (us well as upgrade to the current version of Flash) and let me know if you still experience this problem.

Regards
Gil
The only pending Windows Updates were to Visio and Windows Defender. I applied them but no change. Also downloaded the current Flash installer for IE but it told me I already have a newer version (I have automatic updates on for Flash).

The error is in IE 10. Interestingly, I do not get the error in Chrome. However, in Chrome the [body] tag contents is completely replaced with your [object] tag. Note that I load code that includes the call to AC_VHost_Embed into part of the page using Ajax.
Eric -

We will (obviously) need to investigate further.

Do you mind using your IE10 browser to go to - http://supportdetails.com/ & send the report to support@sitepal.com

Thanx,
Gil
I was able to create a minimal example that reproduces this behavior. I will email it to the support address.
OK - we received your example and we see the issue.
We're looking at it and will advise asap.
Gil
Eric -

We believe a workable solution would be to use ‘Web Page (No JavaScript)’ embed code - and then you can display the Scene when you need to.

Trying to call our JS embed function in the manner you do creates a conflict as it was not intended to be used that way.

Let me know how goes.
Best
Gil
It appears that the ability to dynamically script the scene, e.g. using sayText(), is lost using the ‘Web Page (No JavaScript)’ option. Is that accurate? That is an absolute requirement for our use case.

Ajax-based websites are common and becoming more common all the time. Do you have plans to support Ajax for the JS embed version in the future?
Eric -
You are right in that the "No JS" embed code does not support API calls. Let me take another look at what if anything we can do.
Regards
Gil
Eric -
I think we have a workaround solution for you.

Use the "No JS" Embed code, as previously suggested, but add to your page the first portion of your JS embed code (the embed functions).
Then you would have access to the API.

Just need to add this at the top of the page - (where xxxxxx is your account id)
Success!

I was able to use JavaScript with the "no-Javascript" version by loading vhost_embed_functions_v2.php. You may want to update the part of the Publishing wizard that states:

"Note that you cannot use Javascript functions to control a character you insert with this HTML only code."
Great!

As far as the Wizard instructions are concerned - they refer to folks using the embed code as provided - and as such are literally correct. What we did here is a "mix and match" - not our standard fare.

Anyway - very glad it worked.