unityobject and webplayer


For a while now im trying to get input output from a webplayer and a page. im able to invoke js functions with Application.ExternalCall, and im able to load pages and pass params thourgh WWW.
info can be found here:http://unity3d.com/support/documentation/Manual/Unity%20Web%20Player%20and%20browser%20communication.html

but im unable or i dont understand how call the webplayer from javascript. (the first example on the page) -

var unity = unityObject.getObjectById(“UnityContent”);
→ what is unityconetent do i need to change this, im not sure i understand what this represent?

unity.SendMessage(“MyObject”, “MyFunction”, “Hello from a web page!”);
→ so i have a unity webplayer, with in a cube with a script with a function “CallMe”,
so to call that function(within a script which attached to a cube) i use
unity.SendMessage(“Cube”, “CallMe”, “some value”)??

last question - lets assume i got it working, can i place the java code anywhere on the html page that was generated by unity?


mmm, if anyone else has some problems with that,

when u build your project unity automaticly build the webplayer under the name unityplayer,

var unity = unityObject.getObjectById(“unityPlayer”);

thats how u use it.