-
Hi,
I´m looking for a nice menu made in flash and have discovered one at http://www.skybrud.dk and would like to know, if anyone knows how to make the effect when you mouseover the buttons. Take a look at http://www.skybrud.dk - it´s a nice effect. Hope anyone knows how to make this effect - wodering if it´s made with actionscripting...??
Thanks,
Thomas
-
madskool.wordpress.com
You like that? I've have to include a button like that in my drag and drop WEB designer then: http://au.geocities.com/brutfood/
Two things going on, the first is along the lines of:-
xdistance=_xmouse-mybutton._x;
ydistance=_ymouse-mybutton._y;
distance=Math.sqrt(xdistance*xdistance+ydistance*y distance);
if (distance<threshold) {
mybutton._xscale=100+distance*xgrowthfactor;
mybutton._yscale=100+distance*ygrowthfactor
}
Play around with constants threshold, xgrowthfactor and ygrowthfactor. You may want to normalise (divide) the growthfactors by threshold to make playing around easier.
The other thing is something like:-
on (rollover) {_parent.mybutton.swapDepths(100)}
This code is just for illustration purposes only - you will write it differently, because you will set up a loop that alters all the buttons. But this is your starting point anyway.
-
madskool.wordpress.com
Funny things happen when you don't put code tags around code in these threads.
Half a statement vanished that checked if distance was less than threshold.
-
madskool.wordpress.com
Doh!
And the Homer Simpson stupidity Award goes to Daniel Freeman, (alias Brutfood), previously innovator and world class DSP expert. Now reduced to filling Flashkit forums with stupid code that does the opposite to what you want. Definitely going Senile!
Sorry about that, at least I realised my blunder. What I wrote before was the incredible shrinking buttons - not amazing growing ones.
Lets have another go shall we:-
Code:
xdistance=_xmouse-mybutton._x;
ydistance=_ymouse-mybutton._y;
distance=Math.sqrt(xdistance*xdistance+ydistance*ydistance)/threshold;
if (distance<1) {
mybutton._xscale=100+(1-distance)*xgrowthfactor;
mybutton._yscale=100+(1-distance)*ygrowthfactor
}
Ok, that's as close as we get without me trying in real Flash MX, not the simulator in my head.
-
madskool.wordpress.com
Funny things happen when you don't put code tags around code in these threads.
Half a statement vanished that checked if distance was less than threshold.
-
madskool.wordpress.com
You like that? I've have to include a button like that in my drag and drop WEB designer then: http://au.geocities.com/brutfood/
Two things going on, the first is along the lines of:-
xdistance=_xmouse-mybutton._x;
ydistance=_ymouse-mybutton._y;
distance=Math.sqrt(xdistance*xdistance+ydistance*y distance);
if (distance<threshold) {
mybutton._xscale=100+distance*xgrowthfactor;
mybutton._yscale=100+distance*ygrowthfactor
}
Play around with constants threshold, xgrowthfactor and ygrowthfactor. You may want to normalise (divide) the growthfactors by threshold to make playing around easier.
The other thing is something like:-
on (rollover) {_parent.mybutton.swapDepths(100)}
This code is just for illustration purposes only - you will write it differently, because you will set up a loop that alters all the buttons. But this is your starting point anyway.
-
there is a tutorial on that effect called how to build a tsunami here: http://66.70.72.50//forum/tutorials/tsunami/index.html
-
Thanks a lot
Hi there,
Thanks a lot for helping me out with this one. I´ll try to make these buttons at once :-)
Thanks a lot,
Thoms
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
|