查看: 1158|回复: 8
|
[询问]flash button的animation
[复制链接]
|
|
我想请问这里的高手。我看到很多website的flash button,都有酱的效果。当你mouse over那个button时候,就有animation(如,开始发亮)。然后但你的mouse离开button后,还是有animation来令button还原(如,发亮慢慢消失)。又或着,怎样能令在button上mouse over时候的animation,就算你忽然mouse离开那个button,那个animation还是会继续不断/还原呢?是scripting的吧?可以教我那个script吗?谢谢!万分感谢! |
|
|
|
|
|
|
|
发表于 26-7-2005 04:09 PM
|
显示全部楼层
原帖由 devilgray 于 25-7-2005 06:54 PM 发表
我想请问这里的高手。我看到很多website的flash button,都有酱的效果。当你mouse over那个button时候,就有animation(如,开始发亮)。然后但你的mouse离开button后,还是有animation来令button还原(如,发亮慢慢 ...
其实可以不用as的,因为如果你那个图是button的话,你clickx2然后他就会进入button的setting就是up,over,down,hit
那就是你在down(按下去)的格那里放一个mc,那当他被按下去时他就会run 那个mc。其他的如up就是放开时,over就是当鼠标移过它时,hit就没什么用他是说明那图的"感应"范围。。。 |
|
|
|
|
|
|
|
楼主 |
发表于 26-7-2005 04:55 PM
|
显示全部楼层
谢谢。。。但是这些我会。没有mouse "away"吗。。意思是说mouse over(mc启动)又mouse离开后。。。怎样才不让mc停(继续mouse over的mc,或另外的mc来"回复"原状/up)。。这是我想知道的。 |
|
|
|
|
|
|
|
发表于 26-7-2005 06:41 PM
|
显示全部楼层
script 当然需要少少。。。请允许我用英文解答, 中文解答有点困难。。
1. first create a new movieclip.
2. in the movieclip itself, create three layers. label them, for example "action" at top layer, "button" at middle layer, "animation" at bottom layer.
3. create 30 frames for these three layers.
4. For the "action" layer, create keyframe at:
1st frame- label it: normal.
script: stop();
2nd frame- label it: over
15th frame- script: stop();
16th frame- label it: out
30th frame- script: gotoAndStop("normal"
5. for the "animation" layer, you can simply create a 30 frames button animation,
create keyframe at 1st frame, 2nd frame, 15th frame,16th frame and 30th frame
1st frame: nothing change
2nd frame - 15th frame: create motion tween. example, button image alpha from 100 to 50.
16th frame - 30th frame: create motion tween. example, button image alpha from 50 to 100.
6. for the "button" layer, you can simply create a shape, make it into button,(1st frame - 15th frame) double click on it, drag the shape to "hit". then back to the main scene, you might see the button become cyan color. click one the button, open your action script panel, type in the code below:
on(rollOver){
gotoAndPlay("over"
}
on(rollOut, releaseOutside){
gotoAndPlay("out"
}
7. then test the movie...
hopefully you can understand |
|
|
|
|
|
|
|
楼主 |
发表于 26-7-2005 07:50 PM
|
显示全部楼层
wow!厉害!谢谢你!try try now |
|
|
|
|
|
|
|
发表于 27-7-2005 09:52 AM
|
显示全部楼层
|
|
|
|
|
|
|
发表于 27-7-2005 10:39 AM
|
显示全部楼层
其实他的意识是说当你rollover button 时,button会呈现出 rollover effect, 而当你rollout button 时,button也会呈现 rollout effect.
你所教的只有 rollover effect 而没有 rollout effect.
hit 也可以当作透明 button 来用。当在 working stage 时, 它会是 cyan color, 但在test movie 里,它就变透明。
[ 本帖最后由 邪灵 于 27-7-2005 10:43 AM 编辑 ] |
|
|
|
|
|
|
|
发表于 27-7-2005 10:49 AM
|
显示全部楼层
原帖由 邪灵 于 27-7-2005 10:39 AM 发表
其实他的意识是说当你rollover button 时,button会呈现出 rollover effect, 而当你rollout button 时,button也会呈现 rollout effect.
你所教的只有 rollover effect 而没有 rollout effect.
hit 也可以 ...
Ooooo...... i see |
|
|
|
|
|
|
|
楼主 |
发表于 27-7-2005 11:53 AM
|
显示全部楼层
原帖由 邪灵 于 27-7-2005 10:39 AM 发表
其实他的意识是说当你rollover button 时,button会呈现出 rollover effect, 而当你rollout button 时,button也会呈现 rollout effect.
你所教的只有 rollover effect 而没有 rollout effect.
hit 也可以 ...
谢谢明白!多多指教! |
|
|
|
|
|
|
| |
本周最热论坛帖子
|