Action scripting help

how do i fade a mc, on when rollover a button then make it come back on rollout\r\ri used this… \r// on button\ron (rollOver) {\r _root.fade = true;\r}\r\r//on mc\ronClipEvent (enterFrame) {\r if (_root.fade && this._alpha>0) {\r }\r this._alpha -= 5;\r}\r\r\r\rbut 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\r\rany help?

I think I’d go this way…\r\rthe movie clip should have this.\r\ronClipEvent(enterFrame){\r if (_root.fade=true&&this._alpha>0){\r this._alpha–;\r }else if (this._alpha<100){\r this._alpha++;\r }\r}\r\rThen on the button have this\r\ron(rollOver){\r _root.fade=true;\r}\ron(rollOut){\r _root.fade=false;\r}

it still fades when the ms is on screen, but slower.\r\ri want it to start fading when i press the button\r\r\rne help?

what is the ms?

ummm \r\rlike 4 secs

no I mean… what is “ms”… I know not that term :slight_smile:

Sorry I was off\r\ronClipEvent(enterFrame){\rif (_root.fade==true&&this._alpha>0){\rthis._alpha–;\r}else if (this._alpha<100){\rthis._alpha++;\r}\r}\r\rThe == is used for comparison. If we use only one = then it actually sets the fade to true, instead of comparing it.

when i play the mc again\r\rit doesnt work, like doesnt show\ras in i think i might still be at _alpha 0

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.