编辑 Action Script 2.0 循环浏览图像文件夹时出现问题

发布于 2024-08-22 16:37:29 字数 524 浏览 3 评论 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡紫姑娘! 2024-08-29 16:37:29

无法在纯 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文