PDA

View Full Version : FMX Script experts---HELP!



Lagartija
June 23rd, 2003, 01:17 AM
I've been doing a tutorial out of a book that basically replicates the navigation engine used at www.sofake.com (check it out if you haven't, it's nice!) and there's one small problem. As you'll see, there are multiple panel sets sized differently that gets "zoomed in on" basically when you press the buttons. Well, when moving one panel at a time the engine seems to work fine, however, if you skip buttons (i.e. begin on panel 1 and jump ahead to panel 6) the animation skips ahead quite a bit before easing into the corresponding panel of the button pressed. However, when moving backwards, even if you skip buttons, the animation scrolls back at a constant. You need to see both www.sofake.com and the attached .fla to really understand what I mean. Anyway, I think I've narrowed down the problem area but can't figure out how to fix it.
This is the scale code:

function SCALE(CLIP, SET) {
//scale
start = CLIP._xscale;
end = SET-start;
CLIP._xscale = start+(end/5);
CLIP._yscale = start+(end/5);

The /5 after the "end" tells it to divide the start rate of animation by 5 thereby "easing out" the animation. That's all fine, but what I want to do is additionally "ease in" the animation like on sofake.com
All relavent script is in frame 1 of the movie clip titled "main"
Please check it out and see if you have any suggestions....
Thanks.

Lagartija
June 23rd, 2003, 07:23 PM
Anyone?? PLEEZ??

thoriphes
June 23rd, 2003, 07:47 PM
ease out | ease it

opposites. what's the opposite of dividing?

yep, multiplying ;)


CLIP._xscale = start+(end*5);
CLIP._yscale = start+(end*5);

just watch out as this may cause your clip to shoot offscreen. be sure to have a termination condition, or a point where you tell it to stop scaling.

Lagartija
June 23rd, 2003, 08:01 PM
yeah, I tried that but now it's going too fast. Click the last button at the far right, then click the first button on the left. See the smooth transition between all the panels ending with the first? Now click the far right button again. No more smooth transition. It works going backwards but not forwards. I would like the same effect going "in" as it already is going "out." follow me?