View Full Version : Evb Effect??????
pull_my_finger
01-12-2005, 01:59 PM
Greetings,
I'm trying to use the scale effect that EVB.com uses. I can scale the object, but my navigation scales with it to. Does anyone know how to keep the nav the same size while the object scales?
Cheers
pull_my_finger
the scaling box is a seperate movieclip that the clip that contains the navigation...
pull_my_finger
01-13-2005, 02:02 AM
Greetings again,
Thanks for the tip (TGP) it worked, but now the box_mc will scale, but the nav_mc stays in place and will not move with the box_mc, is there any script out there that would help this problem and move both together???
you need to be controlling the scale of the content box, and the placement of the nav (contain it all in a movieclip...)
and have the nav mc be placed something like...
navContainer_mc._y = box_mc._y + 10;
cheers.
j
pull_my_finger
01-14-2005, 01:09 PM
tGp, thanks for the help, finally got it to work to semi work.
cheers
pull_my_finger
pull_my_finger
01-14-2005, 11:29 PM
OK my bad, I guess what I did never worked. the brake down
box_mc is the box I want to scale
nav_mc is the navigation
I put the box_mc into the nav_mc and the box scales, but the nav_mc does not move with scale. It stays in the same spot. I've tried (nav_mc._x= box_mc._height+10). I guess the best example is braingiant.com, I've been using his source code.....Any thoughts
Cha Ching
Pull_my_finger
post your code or fla...
cheers.
j
pull_my_finger
01-16-2005, 01:57 AM
tGP,
Code on the main timeline://
stageWidth = 400;
stageHeight = 400;
wmodifier = 300;
hmodifier = 150;
bouncefactor = .7;
speedfactor = 8;
expand = function (id) {
// colorSquare width
this.destwidth = wmodifier;
this.poswidth = id._width;
this.velwidth = this.velwidth*bouncefactor+(this.destwidth-this.poswidth)/speedfactor;
id._width += Math.round(this.velwidth);
// colorSquare height
this.destheight = hmodifier;
this.posheight = id._height;
this.velheight = this.velheight*bouncefactor+(this.destheight-this.posheight)/speedfactor;
id._height += Math.round(this.velheight);
// colorSquare x
this.destx = (stageWidth-wmodifier)/2;
this.posx = id._x;
this.velx = this.velx*bouncefactor+(this.destx-this.posx)/speedfactor;
id._x += Math.round(this.velx);
// colorSquare y
this.desty = (stageHeight-hmodifier)/2;
this.posy = id._y;
this.vely = this.vely*bouncefactor+(this.desty-this.posy)/speedfactor;
id._y += Math.round(this.vely);
// shadow properties
_root.nav._x = shadow._width+10;
_root.nav._y = shadow._height+10
_root.nav.shadow._width = (colorSquare._width+5);
_root.nav.shadow._height = (colorSquare._height+5);
_root.nav.colorSquare._x = (colorSquare._x+10);
_root.nav.colorSquare._y = (colorSquare._y+10);
};
colorSquare.onEnterFrame = function() {
expand(this);
};
//_root.nav._x = (colorSquare._width+5);
// _root.nav._y = (colorSquare._width+5);
Cheers
T
pull_my_finger
01-21-2005, 06:58 PM
Ladies and Gents,
Does anyone know how to keep the navigation from scaling when the "box" scales like on EVB.com? I tried putting my navigation in a seperate MC but it scales along with the "box". If some one has an example it would greatly help me.
I put the nav_mc in the box that scales, but onPress both scale.
I then put the box that scales into the nav_mc and the nav_mc stays in one spot while the box scaled. If someone has the code or break down of how its done and would like to share, please let me know.
Thanks
Pull_my_finger
CyanBlue
01-21-2005, 07:03 PM
I believe this thread is the extension of the other thread???
http://www.actionscript.org/forums/showthread.php3?t=62422
Please keep your question to one thread...
pull_my_finger
02-02-2005, 03:45 PM
Does anyone know how to scale a MC "on(press)" , but keep the navigation the same size, but move navigation with the MC as it scales???????????? It seems that many people post resizing but are unable to address the navigation question that I have.
Cheers to all
Pull_my_finger
pixelwit
02-03-2005, 12:03 AM
Hey CyanBlue. :cool: Threads have been merged.
PullMyFinger, I'm not trying to give you a hard time or anything but please keep questions concerning the same topic within the same thread it just helps keep things organized around here. If you need a thread moved to a different forum, contact the current forum's moderator and they'll move it to the other forum for you as soon as they get a chance.
I've attached a file showing how to resize a clip while repositioning another. Hope it helps.
-PiXELWiT
http://www.pixelwit.com
pull_my_finger
02-03-2005, 12:53 AM
PixelWit,
Thank you for the .fla, it works out great, with a few mod's to the .fla I was able have everything work the way I wanted it to.I guess I was making the code more complex then what it had to be, Sorry about posting twice!!! Thanks for all your help!!!!!!!
Pull_my_finger OUT!!!!!!!!!!!!!!!
pixelwit
02-03-2005, 01:41 AM
Welcome.
-PiXELWiT
http://www.pixelwit.com
pull_my_finger
02-07-2005, 02:47 PM
Pixelwit,
Would you have an idea of how to scale (using your code) another box along with the other. I need to make a box with a that scales correctly with the main box. Much like braingiants web site. It seems that the inner box scales wrong giving a squish look.
Cheers
Pull_My_Finger
not sure if i understand what you are going for, but maybe something like the folllowing added to the scaling logic you already have in your exsisting script...
var border_amount = 5;
inner_box._width = outer_box._width - border_amount;
inner_box._height = outer_box._height - border_amount;
cheers
j
pull_my_finger
02-08-2005, 11:11 PM
J
I was using code similar to that, when the outer box scales to what ever size, the inner box will scale, but it is not proportion to the outer box. The inner box will look squished and not square like the outer one. I have a link/zip file mx 2004 to the code have a look and see what you think is wrong.
Cheers
T
pull_my_finger
02-08-2005, 11:52 PM
I forgot to convert the white box (inner) to a MC in the fla that I uploaded. In the code it is named white and you just have to convert it to a MC and name it white. Sorry about that...........
Cheers
T
pull_my_finger
02-15-2005, 05:25 PM
After countless tries I have not been able to figure out the scaling effect fully. If you go to http://www.braingiants.com/v5/welcome.html notice that when the base scales and the inner box does not squish (all sides are equal), I've down loaded his code but picking it apart and making it work right, has not been easy. I can make the botton base scale, but then the inner box is squished everytime. Does anyone know of a link,fla that can do this. heres the crude looking fla that I have been testing with (This is a Flash MX 2004 file)
Thanks for the help
Cheers
T
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.