Have a look at original reply. I wasn't talking about the <object> tag :)

"if *you *look better the code", you will see you did not give the <embed>
tag a name="myytplayer" in order to target it.

In the Adobe page I pointed you to:

"name (embed only) - *Movie name.* Identifies the Flash movie to the host
environment (a web browser, typically) so that it can be referenced using a
scripting language such as JavaScript or VBScript."

In the old school <object> + <embed> markup, the <embed> tag is what is used
by all non IE browsers.


Aran

On Fri, Nov 5, 2010 at 8:01 AM, illiterate illiterate <
[email protected]> wrote:

> Hi aran thank you for the reply if you look better the code i posted i
> gave an id to the object and tried to get it
> with the line  ytplayer = document.getElementById("myytplayer"); but i
> receive with firebug the error
> ytplayer.playVideo is not a function.I tried also to give a name to
> embed and get it with document.getElementsByName
> still the same error.Maybe the jsapi functions for the player don t
> work with this kind of embed and is strictly
> necessary to use the embed generated with swf.object......
> any suggestions or solution..?
> Thank in advance.
>
> On 4 Nov, 23:49, Aran Rhee <[email protected]> wrote:
> > If you are not using / not wanting to use swfobject, then you're asking
> > questions in the wrong place :)
> >
> > Yes, you can still access dom elements thorugh js without using
> swfobject.
> > You didn't give your embed tag an name param value, so it won't work in
> FF
> > etc.
> >
> > read more here:http://kb2.adobe.com/cps/127/tn_12701.html
> >
> > <http://kb2.adobe.com/cps/127/tn_12701.html>Aran
> >
> > On Thu, Nov 4, 2010 at 1:31 PM, illiterate illiterate <
> >
> > [email protected]> wrote:
> > > hi im trying to embed youtube video using jsapi like this
> >
> > > <object id="myytplayer" style="height: 390px; width: 640px">
> > > <param name="movie" value="http://www.youtube.com/v/u1zgFlCw8Aw?
> > > version=3?
> >
> > >
> version=3&enablejsapi=1&playerapiid=ytplayer&color1=0xb1b1b1&color2=0xcfcfcf&feature=player_embedded">
> > > <param name="allowFullScreen" value="true">
> > > <param name="allowScriptAccess" value="always">
> > > <embed  src="http://www.youtube.com/v/u1zgFlCw8Aw?version=3?
> >
> > >
> version=3&enablejsapi=1&playerapiid=ytplayer&color1=0xb1b1b1&color2=0xcfcfcf&feature=player_embedded"
> > > type="application/x-shockwave-flash" allowfullscreen="true"
> > > allowScriptAccess="always" width="425" height="344"></object>
> >
> > > not using swf.object,its possible in this case to use jsapi function
> > > like for example
> >
> > > function play() {
> > >   ytplayer = document.getElementById("myytplayer");
> >
> > >  if (ytplayer) {
> > >    ytplayer.playVideo();
> > >  }
> > > }
> >
> > > <a href="javascript:void(0);" onclick="play();">Play</a>
> > > because it doesn t work for me anyone have any suggestions or
> > > solutions?jsapi functions can work only with swf.object embed?
> > > thanks in advance.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "SWFObject" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<swfobject%[email protected]>
> <swfobject%[email protected]<swfobject%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/swfobject?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "SWFObject" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<swfobject%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to