View Full Version : Zooming in and out on an image (Flash5)
ericinho
January 24th, 2003, 12:29 PM
I want to zoom in and out on an image (it's actually a thumbnale which pops up). Or if you want, to have a small image 'grow' to a larger format.
I tried it with scaling + tween, but it is hardly a smooth transition.
are there better ways of doing it (without manually adjusting each frame of the tween)?
Guig0
January 24th, 2003, 12:33 PM
have you tried to increase you fps ? :bounce:
megalene
January 24th, 2003, 12:53 PM
i actually did a zoom once, and it worked out pretty good. here is what i did:
MovieClip.prototype.zoomIt = function() {
if (_root.yourMCname._xscale>300) {
clearInterval(intId);
} else {
_root.yourMCname._xscale = _root.yourMCname._xscale+5;
_root.yourMCname._yscale = _root.yourMCname._yscale+5;
}
then on the movie clip (MC) highlight it and go to actions
and add this:
onClipEvent (load) {
intId = setInterval(zoomIt, 100);
}
hope this helps.
Guig0
January 24th, 2003, 01:58 PM
yes, that is a good script way, as there are several others.
But what got my attention was the smooth part:
I tried it with scaling + tween, but it is hardly a smooth transition.
that is only fixed with fps increase.
megalene
January 24th, 2003, 02:03 PM
yes you are right fps is the best way to get a smooth animation.
Guig0
January 24th, 2003, 02:21 PM
and you got a nice code there. ;) you made it?
ericinho
January 24th, 2003, 04:51 PM
thanks for the code, I will try that.
about the fps.
I am currently running the anim at 24fps and for the main I want to keep that.
If I load an external SWF onto the main, will the SWF keep its own (and faster) FPS, or will it adapt to the framerate of the main swf?
Guig0
January 24th, 2003, 04:56 PM
24 fps is good!
and, no. the loaded swf will be with the same fps as the main.
morse
January 25th, 2003, 02:09 AM
You can chage frame rate using AS.
Guig0
January 25th, 2003, 11:24 AM
but will affect all movies, main included. i think :-\
ericinho
January 26th, 2003, 03:43 AM
thanks all.
i don't think the fps is the problem, but the scaling of the image.
Guig0
January 26th, 2003, 04:28 AM
fps = smoothnes
unless you did something very wrong :-\ if you can post your fla here iŽll take a look at it :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.