:puzzled: Hello everyone,
I’m new to this forum and I look forward to learning lots from fellow Flash users. I have recently become almost addicted to using Flash since my school introduced me to it last year.
Right now I am taking the Flash 8 Advanced Authoring and Scripting class and one of our projects was to create a transition in and transition out. One of my classmates showed me how to use the tween class for this process and I have been able to make it work for the in transition, but unable to make work on the out transition.
I am wondering if anyone in here can help me figure this out.
Here is the code I’m using for the tween class and it is set in frame one of the main scene:
stop();
// import the tween class
import mx.transitions.Tween;
import mx.transitions.easing.*;
// set the function
function growImg(gi) {
//this grows the xscale
var twn:Tween = new Tween(gi, “_xscale”, Strong.easeOut, 0, 100, 1, true);
//this grows the y scale
var twn2:Tween = new Tween(gi, “_yscale”, Strong.easeOut, 0, 100, 1, true);
}
// initiate the function on the first frame
// set the function
function shrinkImg(si) {
//this shrinks the xscale
var twn:Tween = new Tween(gi, “_xscale”, Strong.easeOut, 100, 0, 1, true);
//this shrinksthe y scale
var twn2:Tween = new Tween(gi, “_yscale”, Strong.easeOut, 100, 0, 1, true);
}
growImg(mc_content);
growImg(mc_content);
growImg(mc_content);
mc_content.homeBtn.onRelease = function() {
_root.jump = “home”;
mc_content.play();
};
mc_content.livBtn.onRelease = function() {
_root.jump = “living”;
mc_content.play();
};
mc_content.dinBtn.onRelease = function() {
_root.jump = “dining”;
mc_content.play();
};
mc_content.bedBtn.onRelease = function() {
_root.jump = “bedroom”;
mc_content.play();
};
mc_content.kidsBtn.onRelease = function() {
_root.jump = “kids_room”;
mc_content.play();
};
Then when I click into the movie clip where I want these functions to run I have an action frame set at the beginning of each frame label with a growImg like this:
stop();
_root.growImg(living1.mc_living01);
_root.growImg(living1.mc_living02);
_root.growImg(living1.mc_duraLiveTxt);
_root.growImg(living1.mc_sothebyLiveTxt);
As I mentioned, the growImg works, but I don’t know where to plug in the shrinkImg information to make these images shrink down when the movie jumps to another label. gotoAndPlay(_root.jump);
I really hope that someone can help shed some light on this.
Thank you Bunches