我为我的照片厨房找到了AS,它在主框架上工作得很好。问题是我想将它放在另一个mc(滑出菜单)中,然后停止工作。
滑动菜单是:menu_mc,里面应该是我的画廊。 就像我说的剧本在主场景上工作得很好。 任何帮助将不胜感激。
var numOfPix:Number = 6;
var pos:Array = [0, 190, 380, 570, 860, 1050];
var theInfo:Array = ["The First Car", "The Second Car", "The Third Car", "The Fourth Car", "The Fifth Car", "The Sixth Car"];
var w:Number = _level0.the1_btn._width;
var h:Number = _level0.the1_btn._height;
//~~~ The text Format ~~~
var theFmt:TextFormat = new TextFormat();
theFmt.align = "center";
theFmt.color = 0xFF6600;
theFmt.font = "theFont";
theFmt.size = 20;
theFmt.bold = true;
//
for (i=1; i<=numOfPix; i++) {
_level0["the"+i+"_btn"].createTextField("theNum_txt", 1, 0, 0, w, h);
_level0["the"+i+"_btn"].theNum_txt.text = i;
_level0["the"+i+"_btn"].theNum_txt.setTextFormat(theFmt);
}
//
_level0.info_txt.selectable = false;
_level0.info_txt.setNewTextFormat(theFmt);
//
for (i=1; i<=pos.length; i++) {
_level0["the"+i+"_btn"].n = i;
_level0.info_txt.text = _level0.theInfo[0];
_level0["the"+i+"_btn"].onRelease = function() {
_level0.thePix_mc.panorama_mc._x = _level0.pos[this.n-1]*-1;
_level0.info_txt.text = _level0.theInfo[this.n-1];
};
}