I need some help making two dynamic images fade appropriately…
On the main stage…
photo slider mc (contains dynamic image buttons)
lgshell mc ---- where I load the larger images into, when image buttons are clicked onto…
PHOTO slider mc----
there are two buttons that have actionscript to load the image into lgshell mc, but… how do i create an alpha fade effect for the last image and the image just clicked on…
I would like to be able to use muliple buttons, but for now I only have two buttons…
I have tried to do this through animation tweening, but I couldnt get it to work out correctly…
I need some help, If you would like the link for the .fla let me know…
but.onPress = function () {
_root.createEmptyMovieClip("container1",1);
_root.container1.loadMovie("v1.swf");
//you should make your image a swf.I have replaced the preciouss....jpg with v1.swf
container1._x = -50 ;
container1._y = 285.9;
container1._width=100;
container1._height=100;
container1._alpha = 0;
//the container x and y position are defined by you,same with the height and width
accel = container1._alpha + 1/2;
onEnterFrame = function() {
container1._alpha = container1._alpha + accel;
container2._alpha = container2._alpha - accel;
}
}
but2.onPress = function (){
_root.createEmptyMovieClip("container2",1);
_root.container2.loadMovie("v2.swf");
//the same thing but you create a different movieclip
container2._x = -50 ;
container2._y = 285.9;
container2._width=100;
container2._height=100;
container2._alpha = 0;
accel1 = container2._alpha + 1/2;
onEnterFrame = function() {
container2._alpha = container2._alpha + accel1;
container1._alpha = container1._alpha - accel1;
}
}
ok this is the code you put in the layer in the first frame.
Now the “but.onPress” referes to a certain buton on your movie.Since i don’t know how your buttons are named i just used a general description for them.In order to work you should give an instance name for each button(in the properties box)
Example: if your buton that loads the first image has the instance image you’ll have to replace the “but.onPress” with “image.onPress”
If you still have doubts about it then post your fla and i’ll modify it.The above code is not tested but i think it should work.