-
Hey guys !
I have a button and a movieclip on the stage.
I want to make a rollout event on the button
How can i make it in actionscript that the alpha changes from 100 to 0 when the rollout event is triggerd ?
Hope u guys can help me
grtz
-
Dear Friend,
Good morning,
I am amit shah from India.
Give me your ASL (age,sex,location)..
thanks..
I am new in this board as well as for flash..
I am not giving you the solution but I want some help from u,
I hope you help me..
Dear I want a tutor about flash script if you have...
kindly send that to me..please..
please send me your ans on below email:
pageinternet_2000@yahoo.com
thanking you,
Amit Shah..
-
-
1) make an empty MC, for example called "alphaChange"
2) write handler on this MC:
onClipEvent (load) {
start = 100
end = 0
speed = 1
this.gotoAndStop(1)}
}
3)within this MC create three frames:
//first frame only stops movie and adjusts a start value of targetMC alpha:
targetMC._alpha = start
this.stop()
//second frame decreases aplha:
targetMC._alpha = targetMC._alpha - speed
//third frame decreases alpha and when alpha equals or
//is more then end value, it stops
if (targetMC._alpha < end) {
targetMC._alpha = targetMC._alpha - speed
this.gotoAndPlay (2}
}else {
this.gotoAndStop(1)
}
3) on button will be this script
on (rollOut) {
alphaChange.gotoAndPlay (2)
}
Just now you can change start and end values od alpha and speed of alpha changing. Or, if you want, you can set the speed value negative and you can call alphaChange MC to increase alpha....
hope this helps
Alex
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|