mac 脚本_Flash脚本-酷Mac按钮菜单

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
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值