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检查影片。
movieclip