View Full Version : Portfolio like Screwface's below but different...
Narrowfeather
07-01-2002, 02:56 PM
I want to do a portfolio of succesive images with back and forward buttons but I need each image to (alpha) fade from the current image into the new image (either forward or back). I tried to do this on a standard timeline but of course you can't reverse back to the previous image. (Can you?) So I figure it will be swapping MCs or something like that. I know you guys have done this a million times, what is the best way?
I want the new image (forward or back) to fade in over the existing image if possible. -Narrowfeather
Narrowfeather
07-02-2002, 02:14 AM
I found a complicated way to do it using movie clips of every possible fade combination. It works but it is not very elegant or trim. I am sure there is a better way using actionscripting. Can anybody help with this?
Here is a link to my clunky solution (too big to post):
http://www.digitalbutterfly.com/actionscript.html
do a search here in the forums on 'flem' you should find a link to chattyfig leaf or another brandon hall site. brandon hall had created a pre mx structure for capturing events he called it flem. one of his examples is a really elegant way of doing exactly what you want to do. if you can't find it, let me know. i may have downloaded the source, but don't have time to look now.
lafatak
07-04-2002, 07:01 AM
Screwface...I didn't find your choice of solution so much 'clunky' as overly complicated. I know that are ways to Actionscript solutions to this...I did a tutorial, but can't recall where....maybe here. It was too much for my simple mind to recall outright...
The way I approached this was to build individual .swf files for each portfolio section and then load them into levels. The individual movies are faded in and faded out using a tween and frame labels.
Using an example with 3 portfolio offerings/.swf's....Frame 1 actions...
//load your first movie and set the playhead position for the other
//2 movies (to be loaded in next frames).
stop();
loadMovieNum("movie1.swf", 1);
_level2.gotoAndPlay("fade out");
_level3.gotoAndPlay("fade out");
Frame 2 actions...
//Load movie 2 and set movie 1 & 3 playhead to correct frame.
stop();
loadMovieNum("movie2.swf", 2);
_level1.gotoAndPlay("fade out");
_level3.gotoAndPlay("fade out");
Frame 3 actions...
//Load movie 3 and set movie 1&2 playhead to correct frame
stop();
loadMovieNum("movie3.swf", 3);
_level2.gotoAndPlay("fade out");
_level3.gotoAndPlay("fade out");
My back button actions...
//change the frame numbers accordingly.
on (release) {
if (this._currentframe == 1) {
gotoAndStop(3);
} else {
prevFrame();
}
}
My forward button actions...
on (release) {
if (this._currentframe == 3) {
gotoAndStop(1);
} else {
nextFrame();
}
}
If you want to use individual buttons for each portfolio item, you don't need to use the frames at all, just place the load movie actions on the buttons. Depends on how many items there are...Script can get a little bulky if there are a large number of items.
Laf
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.