English 中文(简体)
YouTube Grid美术馆:我怎么能让参与者出现在一个人群中?
原标题:YouTube Grid Gallery: How can I get the player to appear in a popup?

I m 采用以下代码:

<head>
<script type="text/javascript" src="http://swfobject.googlecode.com/svn/trunk/swfobject/swfobject.js"></script>
<script type="text/javascript">
function loadVideo(playerUrl, autoplay) {
  swfobject.embedSWF(
      playerUrl +  &rel=1&border=0&fs=1&autoplay=  + 
      (autoplay?1:0),  player ,  290 ,  250 ,  9.0.0 , false, 
      false, {allowfullscreen:  true });
}

function showMyVideos2(data) {
  var feed = data.feed;
  var entries = feed.entry || [];
  var html = [ <ul class="videos"> ];
  for (var i = 0; i < entries.length; i++) {
    var entry = entries[i];
    var title = entry.title.$t.substr(0, 15);
    var thumbnailUrl = entries[i].media$group.media$thumbnail[0].url;
    var playerUrl = entries[i].media$group.media$content[0].url;
    html.push( <li onclick="loadVideo(  , playerUrl,   , true)"> ,
               <span class="titlec"> , title,  ...</span><br /><img src=" , 
              thumbnailUrl,  " width="130" height="97"/> ,  </span></li> );
  }
  html.push( </ul><br style="clear: left;"/> );
  document.getElementById( videos2 ).innerHTML = html.join(  );
  if (entries.length > 0) {
    loadVideo(entries[0].media$group.media$content[0].url, false);
  }
}
</script>
</head>
<body>
<div id="playerContainer" style="width: 20em; height: 180px; float: left;">
    <object id="player"></object>
</div>
<div id="videos2"></div>
<script 
    type="text/javascript" 
    src="http://gdata.youtube.com/feeds/users/yerface/uploads?alt=json-in-script&callback=showMyVideos2&max-results=9">
</script>
</body>
</html>

http://groups.google.com/group/you-api-gdata/browse_thread/thread/f3994f8078d20fe6。

如何最容易地让参与者登峰造就? 我先利用可见和显示的方式,与安保部的各种选择相联,但我似乎无法纠正。 感谢大家对新布局的任何ti。

问题回答

如果你想把参与者放在你的内容之上,你可以使用<条码>:绝对;,将其从文件内容流出。 然后,你使用<代码>top 和left规则将其放在你喜欢的地方。 由于你们已经知道你们的流行程度,你可以把ava子作为中心,用来计算上层和左边的位置。

Good luck,
Per Flitig
Netlight Consulting





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签