七彩空间-七彩课堂[FLASH动画教程]
如何设置flash显示的中心点
       flash里用Stage.scaleMode="noScale"后如何设置flash显示的中心点?
我在flash里使用Stage.scaleMode="noScale";的时候发现flash缩小后只显示图片的右下角```有什么办法可以设置让flash缩小后显示在原来flash大小的中心点上?
MC的元素上下左右都居中
以帮我解释一向下这个Flash命令吗,还有Stage.showMenu和random的用法
Stage.showMenu = false;
abc = "http://www.xxx.com/xxx/xxx/ab" + (random(14) + 1) + ".swf";
loadMovieNum(abc, 1);
Stage.showMenu = false;
//不显示菜单
abc = "http://www.xxx.com/xxx/xxx/ab" + (random(14) + 1) + ".swf";
//生成 “http://www.xxx.com/xxx/xxx/ab1~15.swf“的中的一个swf文件名,并赋于变量abc。
loadMovieNum(abc, 1);
//载入abc变量所指定的影片.
function bigPicMove()
{
var temp_numx;
var temp_numy;
var over_numx = (900 - Stage.width) / 2 + 40;
var over_numy = 325 - bigPicMc._height / 2;
bigPicMc.onEnterFrame = function ()
{
temp_numx = (over_numx - this._x) / 2;
temp_numy = (over_numy - this._y) / 2;
if (Math.abs(temp_numx) <= 0.080000 && Math.abs(temp_numy) <= 0.080000)
{
this._x = over_numx;
this._y = over_numy;
delete this["onEnterFrame"];
}
else
{
this._x = this._x + temp_numx;
this._y = this._y + temp_numy;
} // end if
};
} // End of the function
function smallPicMove()
{
var temp_numx;
var temp_numy;
var over_numx = Stage.width / 2 + 450 - smallPicMc._width - 38;
var over_numy = (650 - Stage.height) / 2 + 115;
smallPicMc.onEnterFrame = function ()
{
temp_numx = (over_numx - this._x) / 2;
temp_numy = (over_numy - this._y) / 2;
if (Math.abs(temp_numx) <= 0.080000 && Math.abs(temp_numy) <= 0.080000)
{
this._x = over_numx;
this._y = over_numy;
delete this["onEnterFrame"];
}
else
{
this._x = this._x + temp_numx;
this._y = this._y + temp_numy;
} // end if
};
} // End of the function
System.useCodepage = true;
Stage.scaleMode = "noScale";
getURL("FSCommand:allowscale", false);
var stageListener = new Object();
stageListener.onResize = function ()
{
smallPicMove();
bigPicMove();
};
Stage.addListener(stageListener);
var nowAlbum = _global.albumName;
ssp.xmlFileType = "Director";
ssp.xmlFilePath = "photo/images.php?album=" + nowAlbum;
ssp.directorLargeImageSettings = [85, 1, 100];
ssp.directorThumbImageSettings = [80, 2];
ssp.navLinkPreviewSize = [50, 50];
ssp.navLinkPreviewScale = "Crop to Fit";
ssp.displayMode = "Manual";
ssp.width = 630;
ssp.height = 630;
ssp._visible = false;
var sspListener = new Object();
var theArr = new Object();
var albumArr = new Object();
var lgPath;
var tnPath;
var albumCount;
var albumID;
var thumbLdr = new MovieClipLoader();
var largeLdr = new MovieClipLoader();
sspListener.onGalleryData = function (eventObject)
{
theArr = eventObject.data;
};
ssp.addEventListener("onGalleryData", sspListener);
sspListener.onAlbumData = function (eventObject)
{
albumArr = eventObject.data;
lgPath = albumArr.lgpath;
tnPath = albumArr.tnpath;
albumCount = albumArr.totalImages;
smallPicMc.createThumb(albumCount);
smallPicMc.titleText = theArr[0][1][0].title;
bigPicMove();
smallPicMove();
play();
};
ssp.addEventListener("onAlbumData", sspListener);
stop();
 
信息推荐
资讯中心 | 电子商务 | 搜索营销 | 设计学院 | 中医养生 | 养生保健 | 节日祝福 | 民俗文化 | 奇闻趣事
建站知识 | 人世百态 | 网站导航 | 传统节日 | 搜索热点 | 星座运势 | 趣闻轶事 | 祝福的话 | 短信大全
© 2023 QicaiSpace.Com