当前位置:网站首页>An animation based button animation combined with basic code
An animation based button animation combined with basic code
2022-08-03 13:13:00 【The rain wing light dust】
文章目录
The previous section covered the basic use of buttons,This section talks about the use in conjunction with the base code.
一、新建按钮
(1)画一个矩形
用【矩形工具】画一个圆角矩形.(Change the round angle to 80)
(2)Convert to button
Place the rectangle you just made,选中.
按F8
转化为元件,类型为“按钮”.
二、指向
(1)Build components internally
Double click the enter button.
“弹起”when it is blue.
在“指向”的位置,按F6
Convert to keyframes.
再次选中,F8
转化为元件,类型改为“影片剪辑”.
(2)创建关键帧
然后双击进入.
在第5帧和第20The position of the frame creates keyframes.(快捷键F6
)
(3)改变颜色
在第20帧的位置,Change its color to green.
(4)创建补间形状
将第5帧到第20帧中间,右键“创建补间形状”.
这样的话,第5帧到第20The frame color is the transition.(From blue to green)
三、点击
(1)创建关键帧
First exit the current component and return to it“按钮”.
在“按下”的地方,按F6
Convert to keyframes.
(2)换颜色
Just now we did“指向”is a movie clip.
那么,现在还是“影片剪辑”.
我们要Ctrl
+B
打散,Change it to yellow.
(3)目前效果
Go out and go back first“场景1”.
然后Ctrl
+Enter
查看效果.(Only the mouseover button color change is demonstrated here,Click the button and it will turn yellow,No demo just,I'm afraid everyone will be confused)
(4)更改代码
可以看到,上边,when the mouse is placed(指向),The button color keeps flashing.
How can it not flash?
First double-click the rectangle to enter“按钮”.
点击一下“指向”关键帧.
Then double click to enter“矩形(内)”.
按下快捷键F9
,打开代码.
点击这个小箭头,然后点击“AS”.
双击文件“Stop at this frame”.
There will be code here.
(5)效果
Then we fork these off,Click out to go back“场景1”.
然后ctrl
+Enter
看一下效果.
可以看到,当鼠标放上去的时候,按钮颜色(from blue to green)change naturally,It didn't jump.
四、小案例
Do a mouse click here,A small case of image rotation.
(1)Insert the first sheet
在第1Frame insert bunny picture.(Resize the picture to fit the stage)
(2)Insert the second sheet
在第2帧按F7
插入“空白关键帧”.
Then drag the squirrel picture into it.
(3)Insert the third sheet
在第3帧按F7
插入“空白关键帧”.
Then drag in the kitten picture.
(4)创建按钮
新建一个图层.
在第1帧的位置,画一个矩形,Cover the stage.
Then convert this rectangle into a component,类型为“按钮”.(按F8
)
降低Alpha值,Make it a transparent button.
(5)Click to stop at the next frame
Press on the first frameF9
打开代码,双击文件“Click to go to the next frame and stop”.
点击“确定”.
The code is there.
Then turn them off.
看一下效果:
图片太大,无法显示,跳转查看.
(6)Stop at this frame
哎呀,keep jumping.
我们继续在第1帧按F9
call out code.
双击文件“Stop at this frame”.
The code is automatically filled in.
Then fork them off,看一下效果:(点击一次,Go to the next image)
(7)返回到第一帧
The effect just now,is a single click,Just go to the next picture.
to the last picture,Just don't move.
Now I want to click on the last image,转到第一张.
on layer two,Press the third frameF9
.
然后双击文件“Click to go to frame and stop”.
We want to start with the last one,转移到第1帧,So this place changed to1.
After fork off,看一下效果:
希望文章对你有帮助,原创不易,多多支持~
边栏推荐
- 期货公司开户关注的关键点
- An introduction to 3D tools
- An animation optimization of traditional guide layer animation
- 如何让history历史记录前带时间戳
- 漫画:怎么证明sleep不释放锁,而wait释放锁?
- PolarFormer: Multi-camera 3D Object Detection with Polar Transformers 论文笔记
- 字节最爱问的智力题,你会几道?
- Notepad++ install jsonview plugin
- [微服务]多级缓存
- 欧曼自动挡、银河大马力、行星新产品 欧曼全新产品以燎原之势赢领市场
猜你喜欢
BOM系列之sessionStorage
Classes and objects (upper)
Image fusion GAN-FM study notes
论文理解:“Gradient-enhanced physics-informed neural networks for forwardand inverse PDE problems“
Yahoo!Answers - data set
Notepad++ install jsonview plugin
VLAN 实验
B站回应“HR 称核心用户都是 Loser”:该面试官去年底已被劝退,会吸取教训加强管理
How can I get a city's year-round weather data for free?Precipitation, temperature, humidity, solar radiation, etc.
AMS simulation
随机推荐
浅谈程序员的职业操守
JS获得浏览器类型
The new interface, jingdong comment interface
php microtime encapsulates the tool class, calculates the running time of the interface (breakpoint)
使用工作队列管理器(三)
(through page) ali time to upload the jar
Secure Custom Web Application Login
Unsupervised learning KMeans notes and examples
An动画优化之补间形状与传统补间的优化
When Nodejs installation depends on cpnm, the install shows Error: Cannot find module 'fs/promises'
How does Filebeat maintain file state?
2022 年 CISO 最关心的是什么?
【R】用grafify搞定统计绘图、方差分析、干预比较等!
Blog records life
Jmeter使用
使用工作队列管理器(四)
【蓝桥杯选拔赛真题48】Scratch跳舞机游戏 少儿编程scratch蓝桥杯选拔赛真题讲解
Free Internet fax platform fax _ don't show number
软件测试自学还是报班好?
15. PARTITIONS「建议收藏」