Re: Problem calling embedded object methods from an user-defined object - FF
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Problem calling embedded object methods from an user-defined object - FF

From: ASM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid>
Date: Sat Apr 22 2006 - 02:24:46 CEST

torbs a écrit :
> I have an defined an object with a method called loadMovie that use a
> method - SetUrl- in an embedded quicktime object. It is embedded using
> the object tag, but I have also tried the embed tag.
>
> The problem is this. Although Firefox recognise the quicktime object as
> a HTMLObjectElement, it does not give me access to it methods from
> within my object. I have created a seperate function and when I in that
> function type document.movieSetUrl(url) it works OK, but in my
> user-defined object it do not allow me access to the methods in the
> quicktime plugin. I can however alter styles etc.
>
> Anyone know how I can access the embedded objects methods from within
> an user-defined object in Firefox. (It works in Internet Explorer)

usually this below works on my Fx :

<a href="#" onclick="document.mysound1.Play()">play sound 1</a>
<object id="mysound1" blah>
   <param
   <embed
    name="mysound1"
    src=" ...
   </embed>
</objct>

If not, you can try to specify witch element you address to :

function callQT(obj) {
obj = document.all? document.all.obj :
      document.embeds? document.embeds[obj] :
      document.obj;
return obj;
}

<button onclick="callQT('sound1').movieSetUrl('../sounds/zick1.mid');">
music 1
</button>

<object id="sound1" blah cassiid and all that>
        <param ...
        <param ...
        <embed
         name="sound1"
         src=" ....
        </embed>
</object>

-- 
Stephane Moriaux et son [moins] vieux Mac
Received on Mon May 1 05:14:19 2006