View Full Version : action scripting help
gezzus234
April 25th, 2002, 02:05 AM
how do i fade a mc, on when rollover a button then make it come back on rollout
i used this....
// on button
on (rollOver) {
_root.fade = true;
}
//on mc
onClipEvent (enterFrame) {
if (_root.fade && this._alpha>0) {
}
this._alpha -= 5;
}
but when the mc appears it fade straight away, n not when rolled over, i know that is due to the onClipEvent (enterFrame) {, but i dunno wat else to put instead
any help?
upuaut8
April 25th, 2002, 02:43 AM
I think I'd go this way..
the movie clip should have this.
onClipEvent(enterFrame){
if (_root.fade=true&&this._alpha>0){
this._alpha--;
}else if (this._alpha<100){
this._alpha++;
}
}
Then on the button have this
on(rollOver){
_root.fade=true;
}
on(rollOut){
_root.fade=false;
}
gezzus234
April 25th, 2002, 04:25 AM
it still fades when the ms is on screen, but slower.
i want it to start fading when i press the button
ne help?
upuaut8
April 25th, 2002, 04:52 AM
what is the ms?
gezzus234
April 25th, 2002, 04:58 AM
ummm
like 4 secs
upuaut8
April 25th, 2002, 05:49 AM
no I mean.. what is "ms".. I know not that term :)
upuaut8
April 25th, 2002, 06:06 AM
Sorry I was off
onClipEvent(enterFrame){
if (_root.fade==true&&this._alpha>0){
this._alpha--;
}else if (this._alpha<100){
this._alpha++;
}
}
The == is used for comparison. If we use only one = then it actually sets the fade to true, instead of comparing it.
gezzus234
April 27th, 2002, 02:12 AM
when i play the mc again
it doesnt work, like doesnt show
as in i think i might still be at _alpha 0
upuaut8
April 27th, 2002, 02:19 AM
Well.. I made test for this script and it worked for me. I'll send that one to you if you provide me an email.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.