答案 0 :(得分:1)
我使用动作脚本已经有一段时间了,但是我认为您应该制作一个Scroll,将所有元素添加到滚动中。参见ScrollControl
如果阵列中具有所有图标,则始终可以更改一个元素在前面,后面和后面的缩放比例。在检测到MouseEvents时,您可以检查鼠标是否在其上。
//FOR FINDING SCREENSIZE
var _stage:Stage=this.stage;
function displaySettings(): void {
_stage.align = StageAlign.TOP_LEFT;
_stage.scaleMode = StageScaleMode.NO_SCALE;
_width = _stage.stageWidth;
_height = _stage.stageHeight;
if (_height < _width) {
var num: Number = _height;
_height = _width;
_width = num;
}
}
//for scaling the object according to height
public function scalingheight(clip: Object, percent: Number) {
var ratio = clip.width / clip.height;
clip.height = percent * _height;
clip.width = clip.height * ratio;
}
//Scale according to width
public function scalingwidth(clip: Object, percent: Number) {
var ratio = clip.height / clip.width;
clip.width = percent * _width;
clip.height = clip.width * ratio;
}
在提出问题之前,请多做一些研究,我们将不胜感激。