Welcome to GraphicForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Zooming Icons

 
   Graphic Forums (Home) -> General Discussions RSS
Next:  scroll down problem  
Author Message
edemoss

External


Since: Apr 04, 2005
Posts: 1



(Msg. 1) Posted: Mon Apr 11, 2005 8:19 pm
Post subject: Zooming Icons
Archived from groups: macromedia>flash (more info?)

I have a list of links and what I am trying to create is an effect that when
your mouse moves over the link it will scale up and the other links will move.
I have this script, but I am unsuccessfull in making it work correctly, the
buttons all insert but the animation is not working properly. Please Help.



init();
function init() {
timeline = _root;
iconlinkage = "smallIcon_mc";
squarecount = 34;
maxcolumns = 8;
//
x_border = 2;
y_border = 22;
//
leftbound = 50;
topbound = 50;
//
maxScale = 300;
normalScale = 100;
//
icons = [];
for (var i = 0; i<squarecount; i++) {
var ico = timeline.attachMovie(iconlinkage, "ico_"+i, i);
var idx = i%maxcolumns;
var idy = Math.floor(i/maxcolumns);
//k
ico.sx = ico._x=leftbound+(idx)*(ico._width+x_border);
ico.sy = ico._y=topbound+(idy)*(ico._height+y_border);
//
if (icons[idy] == undefined) {
icons[idy] = [];
}
ico.idx = idx;
ico.idy = idy;
ico.label = i
ico.onRollOver = function() {
scaleIcon(this, maxscale);
};
ico.onRollOut = function() {
scaleIcon(this, normalscale);
};
//
icons[idy][idx] = ico;
}
}
//
function moverows(idx, idy, mc) {
var i = 0;
while (i+idx<maxcolumns) {
i++;
icons[idy][idx+i]._x =
mc._x+x_border+mc._width+(i-1)*(icons[idy][idx+i]._width+x_border);
}
}
function scaleIcon(mc, endScale) {
mc.scaleTo(endScale, .3, "easeoutback", 0, {updfunc:moverows, updscope:_root,
updargs:[mc.idx, mc.idy, mc]});
}

 >> Stay informed about: Zooming Icons 
Back to top
Login to vote
Display posts from previous:   
   Graphic Forums (Home) -> General Discussions All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]