xml方式载入图片自动轮换显示(2)

2008-04-02 11:07:06来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折



  moveImg();

  }

  MA = setInterval(MoveLeft, jTime);//自动滚动

  MovieClip.prototype.loadImg = function() {//mc装载图片函数

  if (this.i == 0) {//在最前增加张最后的图片,方便向左循环。

  this.loadMovie(myList[myListLen-1].attributes.path);

  } else if (this.i == myListLen 1) {//在最后帧位置怎加第一张图片,方便向右循环

  this.loadMovie(myList[0].attributes.path);

  } else {

  this.loadMovie(myList[this.i-1].attributes.path);

  }

  this._x = this.i*imgW;//初始化位置,逐个相连接

  this.btn._x = this._x;//控制图片上方的透明按钮对应位置

  this.btn._width = imgW;//

  this.btn._height = imgH;//控制’‘’‘’‘’‘对应尺寸

  this.btn.onRelease = function() {//点击图片按钮连接网址

  getURL(myList[this.i-1].childNodes);

  };

  this.btn.onRollOver = function() {//当鼠标在图片上停止自动滚动

  clearInterval(MA);

  };

  this.btn.onRollOut = function() {//当鼠标离开图片,继续自动滚动

  MA = setInterval(MoveLeft, jTime);

  };

  };

  textFiled();

  function textValue(myValue) {//为文本框显示图片对应的说明;

  myformat = new TextFormat();

  myformat.align = "right";

  myformat.color = 0xffffff;

  myformat.font = "宋体";

  myformat.size = 12;

  myformat.bullet = false;

  myformat.underline = false;

  _root.createTextField("mytext", 20, imgW-360, imgH-38, 300, 16);

  mytext.selectable = false;

  mytext.text = myValue;

  mytext.setTextFormat(myformat);

  }

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇: 使用钢笔工具制作图像

下一篇: Flash制作逼真的太阳地球月亮运动漂亮动画