隐锋的BLOG
ASP,.net开发
首先新建一个mc,mc中什么都不要。
在mc上写代码,如下(flash大小为800*600):
onClipEvent (load) {
if (this._width<>0 and this._height<>0) {
  if (this._width>this._height) {
    //图片是横向
    this._height = this._height*800/this._width;
    this._width = 800;
  } else {
    //图片是纵向
    this._width = this._width*600/this._height;
    this._height = 600
    }
  }
}
posted on 2007-07-13 10:54  糊涂隐锋  阅读(1031)  评论(0)    收藏  举报