Groups | Blog | Home
all groups > flash actionscript > august 2007 >

flash actionscript : alpha tween actionscript


zzkid25
8/1/2007 11:01:13 PM
Hello,
I've created some code that allows me to rollover an image and have a tool tip
or info box pop up and follow the cursor, and of course disappear when I
rollout. But i'd like to take it a step further and instead of just going
visible and invisible on rollout/rollover, i'd like to fade it in and out using
the alpha properties in the actionscript. Any advice on how to tweak the code
would be HUGE.

Thanks,
Kid.

contact_mc._visible = false;

contact_btn.onRollOver = function () {
contact_mc._visible = true;
}

contact_btn.onRollOut = function () {
contact_mc._visible = false;
}

function moveTT() {
contact_mc._x = _xmouse;
contact_mc._y = _ymouse;
}

myInterval = setInterval (moveTT,10);
kglad
8/1/2007 11:58:47 PM
you'll need to embed your font and initiate a loop while assigning a parameter
that indicates fade-in (for example, onEnterFrame or setInterval with
fadeDirection=1) on rollOver to fade-in your tt (to a max _alpha of 100) and
change the fade parameter to indictate fade-out (for example, fadeDirection=-1)
while terminating the loop when your tt _alpha reaches zero.
kglad
8/1/2007 11:59:54 PM
_name
8/2/2007 2:32:03 AM
zzkid25
8/2/2007 4:17:11 PM
Thanks a bunch guys,

Couldn't of done it without you. Now all I have to do is break each part of the coding out and really understand what each line means.

AddThis Social Bookmark Button