0

首先,我在我的网站上使用 SoundManager,

但是我在添加到我的网站时遇到了问题,所以为了更好地理解问题,请先查看网站:http: //tinyurl.com/8bugpc7

我试图通过网站阻止声音管理器。该网站有点像垂直滑块。所以有一个菜单,但所有项目都链接到页面的特定类。音乐链接是第三个选项(第 3 页)。但是当我添加 360 音乐播放器时,滑动条无法正常工作,这意味着无论我在何处单击该条,它都只会转到特定位置。实际上它不会在我点击的地方播放。

但是当我将播放器移动到第一类(第一页)时,擦洗栏正常工作。所以我猜那些以前的类(页面)有问题。

我花了几个小时但真的无法理解问题,谁能帮我检查一下并告诉我出了什么问题?

如果你需要下载文件,这里是链接: http ://tinyurl.com/8q83gzu

提前致谢。

4

1 回答 1

0

在 360player.js 中调用了一个函数:我的第 701 行。寻找:

this.mmh = function(e) {

这里 deltaX 变量的计算不正确,很可能是由于轮播创建的偏移量。我通过从 deltaX 变量中减去相同的偏移量来解决我页面上的问题。这是带有伪代码的新函数来修改它:

this.mmh = function(e) {
  /**
   * Here you need to find the offset from the left of the page
   * and assign it to a variable. In your case, it is simply the window's
   * width multiplied by 2.
  */
  offSet = 2 * $(window).width();
  if (typeof e === 'undefined') {
    e = window.event;
  }
  var oSound = self.lastTouchedSound,
      coords = self.getMouseXY(e),
      x = coords[0],
      y = coords[1],
      /* here you subtract your offset and scrubbing should work again */
      deltaX = x-(oSound._360data.canvasMidXY[0]-offSet),
      deltaY = y-oSound._360data.canvasMidXY[1],
      angle = Math.floor(fullCircle-(self.rad2deg(Math.atan2(deltaX,deltaY))+180));
  oSound.setPosition(oSound.durationEstimate*(angle/fullCircle));
  self.stopEvent(e);
  return false;
};
于 2013-03-18T23:46:16.820 回答