900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > movieclip_Flash脚本-在Flash中更改Movieclip的颜色

movieclip_Flash脚本-在Flash中更改Movieclip的颜色

时间:2023-09-04 05:43:34

相关推荐

movieclip_Flash脚本-在Flash中更改Movieclip的颜色

movieclip

Download the sample files here.

在此处下载示例文件 。

1.Create a large rectangle.

1.创建一个大矩形。

2.Convert the rectange to a movie clip, and give it an instance name of "rectangle".

2.将矩形转换为影片剪辑,并为其指定实例名称“矩形”。

3.Create a small square button.

3.创建一个小的方形按钮。

4.Create a small text field, and give it a variable name "hexcode".

4.创建一个小的文本字段,并为其提供变量名称“ hexcode”。

5.Assign the button the folliowing action:

5.为按钮分配整理操作:

on (release)

{

colorchange = new Color("/rectangle");

colorchange.setRGB(0xff33cc);

}

on (release)

{

hexcode = (colorchange.getRGB()).toString(16);

}

6.You’re done! Press ctrl+enter to check the movie.

6.您完成了! 按ctrl + enter检查影片。

翻译自: /movieclips-color-flash/

movieclip

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。