-1

我有一张为 12 月 1 日创建的 Photoshop 图像。此图像将用作 Intranet 站点的日历。像任何普通日历一样,它有一个我希望用户按下的门。我有一份原始文档的副本,当用户按下它时,我想显示新图像来代替门,这样看起来用户已经陶醉在门后面的东西了。

我想我可以使用 Photoshop 的切片工具来完成这项任务。如果我的日历门链接到一个 URL,而不是另一个 .jpg 文件,我可以实现这一点。

我还认为我可以通过导入我的 .jpg 文件并创建一个链接在 Flash 中完成此操作,但我再次认为这仅适用于 URL。

我知道有更好的方法可以做到这一点,但我时间不够。Flash 中的 ActionScript 是否能让我完成这项任务?

我将包含此图像的原始网站是 Visual Studio 2005。它有一些非常基本的 JavaScript 可以自动为每一天加载正确的图像(因为我需要 25 个在 12 月份 [Day1.jpg、Day2.jpg 等ETC])。这工作正常。我只需要为每一天和门后的内容创建日历图像。

4

1 回答 1

1

Yes, a simple actionscript using flash will help you. You can create a document with a button (the button will be the door, you can fill up the background of the button with the door image). Your flash movie may contain 2 keyframes (1 with the default background including the image-button and another keyframe with the image to be displayed when button-pressed). Add some actionscript for the button (basically a GoToAndPlay(# of keyframe with the image) and also a "stop()" action on the image keyframe. Here is a basic example on YouTube Click here. By the kind of thing I guess you want, a little bit of flash animation will make it look better i.e. (door opening clip, 2nd image slide, etc)

As Chris said, a simple JavaScript image swapping code will work too. Here are a couple of examples in StackOverFlow Click Here.

Also you can try some CSS, for example a DIV with the background door and a Hover action that sprite the background to the calendar (click would not be necessary, just hover). Here is a video

I hope any of those solution will work for you, I recommend the CSS one, because it can work with mobile devices, don't require javascript to be enabled, and it's fast and easy.

于 2012-11-28T04:03:59.450 回答