View Full Version : [MX] Help me... Image transition...
BVision
May 24th, 2003, 02:25 PM
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...
Please help.... Im stuck .....
Thankx.
oddin
May 25th, 2003, 06:34 AM
why don't you try something like this.
image1._alpha=0;
image2._alpha=0;
but.onPress = function () {
image1._alpha = image1._alpha+1;
image2._alpha = image2._alpha-1;
}
but2.onPress = function(){
image1._alpha = image1._alpha-1;
image2._alpha = image2._alpha+1;
}
The whole code should be put in the first frame of the layer;)
it's just something i came up now but it should work.If you have any questions PM me:D
BVision
May 25th, 2003, 09:21 AM
Existing Button Code...
**************************************
on (release) {
if (imgdis != 2) {
loadMovie("images/full/Precious Lightning v1.jpg",_root.shell);
}
if (imgdis=2) { }
}
**************************************
How would I implement the following code with my existing code to make the transition?,... I am not understanding this... i appreciate any help....
*************************************
(i put this code in the first frame of the timeline that contains my buttons... )
image1._alpha=0;
image2._alpha=0;
but.onPress = function () {
image1._alpha = image1._alpha+1;
image2._alpha = image2._alpha-1;
}
but2.onPress = function(){
image1._alpha = image1._alpha-1;
image2._alpha = image2._alpha+1;
}
My question is, how do I make this work...
oddin
May 25th, 2003, 10:43 AM
ok....let's see...:+)
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.
BVision
May 25th, 2003, 03:15 PM
I did my best with what you have given me... I still cant get it to work... (it must be something We/I are overlooking...) (-:
link to the ZIP file that should contain everything needed...
http://boundless-vision.com/bv/Photo%20Gallery%20ex2%20edited.zip
oddin
May 25th, 2003, 04:56 PM
here is the solution:tb:
http://oddin.adv.ro/edited.zip
read the readme.txt
PM me for any problems;)
lorne17
September 14th, 2008, 01:45 PM
here is the solution:tb:
http://oddin.adv.ro/edited.zip
read the readme.txt
PM me for any problems;)
Do you think I can get you to re-post this? I am trying to do the same thing with my dynamic images loading in. But I can't seem to get it to work. I would appreciate it. Thanks so much,
Lorne
lorne17
September 15th, 2008, 11:54 PM
Do you think I can get you to re-post this? I am trying to do the same thing with my dynamic images loading in. But I can't seem to get it to work. I would appreciate it. Thanks so much,
Lorne
Anyone have this file available? I'd really appreciate it. Thanks.
Lorne
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.