Thanks Mike, but it was using the appended time-string method to
ensure that my connection id was unique and I still couldn't play more
than one, and neither could Pamela's demo where she apparently uses
that technique as well. Since I had already spent way more time than
allotted to get this done, I am hosting the video files myself for now
and using the following simple method to play them in the info window:
// Prepare connection to video asset
var connection:NetConnection = new NetConnection ();
connection.connect (null);
var stream:NetStream = new NetStream (connection);
stream.client = this;
// Create viewer
var video:Video = new Video ();
video.attachNetStream(stream);
// play video
stream.play(videoUrlString);
// Note that you must define function "onMetaData
(info:Object):void" in the class that creates the NetStream
Hopefully YouTube will release an AS3 API soon and this won't be such
a problem.
Helen
On Aug 8, 7:18 am, "mike (Google Employee)" <[email protected]>
wrote:
> Hi Helen,
>
> I believe this issue can be resolved by ensuring that the original
> player is destroyed, then using a new id when calling connect(id) on a
> new LocalConnection to open the second, and subsequent, videos (e.g.
> use an id that appends the time as a string).
>
> I'm afraid I'm going largely on memory at the moment, but I'll follow
> up in the week once I've checked with some others in the office.
>
> Hope this helps,
>
> Mike
>
> On Aug 7, 1:01 am, helen <[email protected]> wrote:
>
> > Hi Pamela,
> > I'm just getting back to this again. Thanks for the link, I don't know
> > why I hadn't found that before. I have ayoutubevideo in an info
> > window now, using the TubeLoc library in Google Code that uses a
> > LocalConnection to communicate with an as2 swf as you described in
> > your post. I've discovered now that I can't load any other videos,
> > which I know was a problem for you initially, so I went back to your
> > demo app and find that I can't load any videos after the first one
> > there either. Are you aware of this? Do you know any way to fix this
> > problem now?
> > Thanks for your help,
>
> > Helen
>
> > On Jun 21, 9:51 pm, "pamela (Google Employee)" <[email protected]>
> > wrote:
>
> > > Hi Helen-
>
> > > You can do it, but it's not particularly easy sinceYoutubemovies are
> > > written in AS2 and the Flash API is in AS3.
>
> > > Here's a blog post I wrote that discusses
> > > it:http://apiblog.youtube.com/2009/01/flex-embedded-player-christmas-sto...
>
> > > I'd suggest getting simplyYoutubein an AS3 app working first, then
> > > move on to putting them in infowindows, as it's a bit trickier.
>
> > > - pamela
>
> > > On Wed, Jun 17, 2009 at 4:01 AM, helen<[email protected]> wrote:
>
> > > > Hello,
> > > > I would like to play ayoutubevideo in an info window, is this
> > > > possible? If so, how? I have searched the group and can't find
> > > > anything about it. I can't put the embed code in the contentHTML
> > > > parameter for infowindows because it only supports a very limited
> > > > selection of html tags, not <embed> or <object>.
> > > > I hope this isn't a dumb question, I am more accustomed to the JS than
> > > > Flash API.
> > > > Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" 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/google-maps-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---