Hi, I am creating a flash site and I wanted to have a cool transition between pages. I like this tutorial affect but need to change to it what I need as far as editing the actionscript. Take a look at this first and then please read what I need below:
http://www.kirupa.com/developer/mx/alpha_fade.asp
Does anyone know how to control how/what the images change to with buttons? (The image would change according to which button was pushed. ) Also, I would be working with 6 images that are 700 x 500. I just really love that affect, how the images start to fade out while another fades in at the same time. I want to use actionscript and understand it.
Dan, who made that tutorial, tried to help me a long time ago. However, I wasn’t able to get it to work right. My images were different sizes than his and I had 6 images instead of 5. I can’t write script that well. The script I have is:
/*
||== Title: Alpha Graphic Button Fade ==||
||== Author: dan4885 (Dan Alu) ==||
||== Site: www.macromotive.com ==||
||== Date: 8/12/02 ==============||
*/
//Creates a new movie clip on the ‘_root’
//timeline which is named ‘script_clip’
_root.createEmptyMovieClip(“script_clip”, 0);
script_clip.onLoad = function() {
//Makes variable to store inertia.
mosx = 0;
//Makes variable to store inertia.
mosy = 0;
};
//Starts a movie clip loop that executes
//the code everytime the play head enters
//a frame and this only works in Flash MX
script_clip.onEnterFrame = function() {
//Subtracts the total of the button result and ‘mosx’ and 8 determines the speed of the effect.
mosx += (_root.remoteX - mosx) * .3;
//Subtracts the total of the button result and ‘mosy’ and 8 determines the speed of the effect.
mosy += (_root.remoteY - mosy) * .3;
//Used to control the _alpha setting of ‘graphic1’ with dependency of the button result and inertia.
_root.graphic1._alpha = (mosx / 4) - (mosy / 4);
//Used to control the _alpha setting of ‘graphic2’ with dependency of the button result and inertia.
_root.graphic2._alpha = 100 - (mosx / 4) - (mosy / 4);
//Used to control the _alpha setting of ‘graphic3’ with dependency of the button result and inertia.
_root.graphic3._alpha = (mosy / 4) - 100 + (mosx / 4);
//Used to control the _alpha setting of ‘graphic4’ with dependency of the mouse position and inertia.
_root.graphic4._alpha = (mosy / 4) - (mosx / 4);
};
_root.graphic5._alpha = (mosy / 4) - 100 + (mosx / 4);
button1.onPress = function() {
remoteX = 0;
remoteY = 0;
}
button2.onPress = function() {
remoteX = 400;
remoteY = 0;
}
button3.onPress = function() {
remoteX = 400;
remoteY = 400;
}
button4.onPress = function() {
remoteX = 0;
remoteY = 400;
}
button5.onPress = function() {
remoteX = 200;
remoteY = 200;
}
Any help would be appreciated!! Thanks so much!
Jill:)