mac 脚本

tech2024-05-08  90

mac 脚本

When I first saw Mac OS 9, I saw buttons at the bottom of the desktop that scaled according to your mouse position, and decided to do the same thing in Flash.

当我第一次看到Mac OS 9时,我看到了桌面底部的按钮,这些按钮根据鼠标的位置缩放,并决定在Flash中执行相同的操作。

Download the sample files here. Let’s start!

在此处下载示例文件 。 开始吧!

1. Create a movie clip of your choice.

1.创建您选择的影片剪辑。

Here, I’ve used buttons from the Fflash buttons library and converted them to a movie clip. You can add as many movieclips as you like.

在这里,我使用了Fflash按钮库中的按钮,并将它们转换为影片剪辑。 您可以根据需要添加任意数量的电影剪辑。

2. For this effect to work, there is only one thing you have to do. Right click the movieclip, go to the action, insert:

2.要使此效果起作用,您只需要做一件事。 右键单击动画片段,执行操作,然后插入:

onClipEvent (enterFrame) { mouse = _xmouse; if (mouse<0) { mouse = -1*mouse; } scale = 200-mouse; if (scale<100)   { scale = 100; } if (scale>200)   { scale = 200; } setProperty ("", _xscale, scale); setProperty ("", _yscale, scale); }

Place this action in every movieclip. Then, test the movie.

将此动作放在每个动画片段中。 然后,测试电影。

翻译自: https://www.sitepoint.com/script-cool-mac-button-menu/

mac 脚本

最新回复(0)