Hi im working with this 3 buttons and 3 "stains "
two are content and the other one will be for contact info.
The stains are masked on sprites,that scale the mask in.
when i was first creating this i assigned each button a
action to play every sprite near a remove effect then the other appears.
that was my way to remove each sprite and show the other.
But now i came up with the idea that its way cooler that
if im on the stain 1 (that scales in the mask) and want to go to stain 2 or contact,its scales to 0% it is perfectly done
when you click button 2 and then click button 3.
the stain scales out and dissapear.how cool.
but wait...if im on "stain 1 " and want to go to "contact (bt 3)"
the stain 2 appears ! and its really annoying,
what i think is that i can do it this way.
with the "IF" conditional method,i tried but i couldn't make it work.
i need help.The idea is that the stain 2 scales out ..only if it was displayed before and so with the other..
seeing that you've meanwhile decided to... erm... buy, i mean update your swish version and are now able to open sample files, i modified your file. see if it helps.
AHHH Lys !
that math think make the scale thing so much smooth!
i wish i can script like you ..
its so complicated.
thanx but i need to know how to do it using if..
thanx
"selection" is just a variable name. you can name it "milkshake", "x" or "calderone" instead.
button 1 sets "selection" to "1" (could be anything as well, e.g. "a").
the code in scene 1 checks for the value of the "selection" variable on every frame(onenterframe). e.g. button 2 sets it to 2, now the code for a value of 2 will run. the "_root." in front of "selection" simply makes the variables available across sprites, so you don't have to worry about paths.
to learn more about the easing method, open the help files in swish, and do a search for "math.approach".
Thanx for your explanation,i will study more
the math and all scripting,you can make wonders
with that,and avoiding paths.
well..im just starting to understand all the paths.
as we can say "beginner scripting" .-
Btw lys this can't be done following path scripting?
just to avoid confusion, all the _root.'s in front of the sprite names in the script aren't necessary of course - you'll have to leave it in the button actions though (i just copypasted them from the sprite i used in the example before).
you probably want to combine it with if statemants? it can be done, but the objects will just disappear instead of downscale - as in the attached example. otherwise it'll get VERY involving.
YES !
i've done that originally
and i tought i could do something with the
"revert" effect but it didnt happen.
and yes ...i will stick to the dissapear.
the other thing is too complicated.
But i'll study your files anyway.
You learn something new everyday !
thanx lys !
i made that with other method maybe
more confusing and not so organized
on (press) {
_parent.histmovie.gotoAndPlay(2);
}
on (release) {
_parent.linksmov.gotoAndPlay(13);
}
on (release) {
_parent.form.gotoAndPlay(135);
}
on (release) {
_parent.gall.gotoAndPlay(14);
}