编辑 Action Script 2.0 循环浏览图像文件夹时出现问题
我想知道是否有人可以从我购买的闪存菜单中查看我的 ActionScript (2.0)。我知道一些 Flash,但似乎无法找到一种方法来使图像循环浏览文件夹中的所有照片,而不是仅加载一个随机的静态 .jpg。另外,我希望加载的图像具有淡入淡出效果。
感谢您的帮助!
主要AS
//照片 照片 = 随机(5)+1; loadMovie("flash-header-images/"+photo+".jpg", pic.loadhere); onEnterFrame = 函数 () { lefta = gotoa-_alpha; _alpha += lefta/8; if (loadhere._alpha>100 && _alpha>100) { 删除onEnterFrame; } };
图片加载的帧
onEnterFrame = function () { if (loadhere._height>30) { masker.nextFrame(); } 别的 { masker.prevFrame(); } };
I was wondering if someone can look at the ActionScript (2.0) i have from a flash menu that I bought. I know some flash but can't seem to find a way to make the images cycle through all the photos in the folder instead of loading just one random static .jpg. Also, I would like the images to load with a fade effect.
Thanks for any help!!!
The main AS
//PHOTO
photo = random(5)+1;
loadMovie("flash-header-images/"+photo+".jpg", pic.loadhere);
onEnterFrame = function () {
lefta = gotoa-_alpha;
_alpha += lefta/8;
if (loadhere._alpha>100 && _alpha>100) {
delete onEnterFrame;
}
};
The frame that the pics load
onEnterFrame = function () {
if (loadhere._height>30) {
masker.nextFrame();
} else {
masker.prevFrame();
}
};
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无法在纯 as2 中浏览文件夹。
您的 XML 包含路径和图像名称,唯一的方法是使用 php (或任何服务器端脚本)浏览文件夹并以 XML 输出结果。
Its not possible to browse a folder in pure as2.
Your XML contains path and images names, the only way to do it is to use a php (or any server side script) to browse the folder and output the results in XML.