Flash 按钮(创建带有 Flash 按钮的菜单页以打开 SWF 文件)
祝大家有美好的一天。我今天来这里是为了寻求有关 Flash CS4 和 ActionScript 3.0 的帮助。故事开始于有一天,我的老板要求我做一个简短的演示,介绍他们即将进行的新开发软件的用户培训。我对此充满热情和兴奋,因为我已经很长一段时间没有使用Flash了(注意,我没有任何ActionScript 3.0的经验)。起初,一切都有点粗糙,因为我需要回忆如何正确使用帧来创建成功的动画。当我即将完成这个项目时,我的老板再次找到我,问我是否可以在前面插入一个菜单页面,这样用户就不必再次重播整个内容,只是为了在该部分寻找一些东西。电影。所以,是的,一开始我有点犹豫是否要接受。我说过它可以与 Powerpoint 一起使用。但她是个十足的推动者,我被迫答应了。现在我遇到了如何让 Flash 按钮加载 swf 影片的问题。我尝试在整个网络上搜索教程,但大多数时候“getUrl”和其他内容据说已经过时了。请帮忙?
Good day to everyone. I'm here today to seek help about Flash CS4 and ActionScript 3.0. The story starts when one day, my boss asked me to make a flash presentation about their upcoming user training for a newly developed software. I was enthusiastic and excited about it because it's been a long time that I did not use Flash (note that I don't have any experience in ActionScript 3.0). At first, everything was a bit rough as I need to recall how to properly use the frames to create a successful animation. As I was about to finish the project, my boss approached me again and asked if I could insert a menu page in front so that the users won't have to replay the whole thing again just to look for a little something on that part of the movie. So yea, at first I was abit hesitant to accept. I said that it will work with Powerpoint. But she's a total pusher and I was forced to say yes. Now I'm having this problem about how to make a flash button load a swf movie. I've tried searching all over the net for tutorials but most of the times the "getUrl" and other stuff are said to be outdated. Help please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个答案基于我对您的问题的解释,即:“我可以创建一个充当菜单的 SWF,并根据用户在菜单中单击的内容加载不同的 SWF 文件吗?”。
答案当然是肯定的,具体方法如下:
您需要了解/查看的一些内容:
这是一个加载 SWF 的函数:
以下是单击按钮时如何使用此函数:
根据评论中的问题:
您可以使用
navigateToURL()
而不是 Loader 并设置外部 SWF在不同的页面上(基本上就像一个网站)。如果您打算这样做,那么将主索引页面保留为纯 HTML 并在新窗口中启动页面可能更有意义。如果您仍然希望主页为 Flash,则单击新窗口中的页面的操作如下:This answer is based on my interpretation of your question, which is: "Can I create an SWF that acts as a menu, and load in different SWF files based on what the user clicks in the menu?".
The answer is of course yes, and here's how:
A few things you need to understand / look at:
Here's a function to load your SWF:
And here's how to use this function when you click a button:
As per question in comments:
You could use
navigateToURL()
instead of a Loader and set up your external SWFs on different pages (like a website basically). If you're going to do this it might even make more sense to keep your main index page just plain HTML and launch your pages in new windows. If you still want to have your main page as flash then clicking through to a page in a new window is done like this: