[CS3] Crossfading
Hi could anybody show me how a crossfade would work in actionscript 3
or how to do it or what to search for
ive googled everything i can think of and everythings too complicated
i just want to be able to crossfade one movieclip into another no buttons no nothing
anyone help me out?
Thanks
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Crossfading?
Is is possible to crossfade between scenes with Flash 5? If not, is there any great alternative?
Crossfading?
When I have a static picture on 100% original scale it looks ok, but when a transparent object appears above the picture it gets distort or it makes a small move like one pixel left or right. Eg. this happens when I´m making a crossfading of pictures or moving any transparent objects above the static image background. Please help me:-
Jazz
Crossfading Music
Is it possible, in Flash 5 or MX, to crossfade two music clips when a button is pressed?
Crossfading Music
here is my problem...i am trying to crossfade 2 seperate music clips on button press...my functions are working to fade in or fade out...however, i am having problems having them both occur at the same time...this is the problem...i am attaching my swf...thanks in advance...
i am working in mx 2004
tank.
Crossfading Photos For Web
Hello,
I am redesigning a site and like to incorporate a flash .swf file on the frontpage.
I have 5 photos that is cropped and I like to make a crossfade of all 5 photos and display it on one place.
In Flash MX 2004, how would you start the work?
Thank you in advance!
[F8] Crossfading Web Pages
I am trying to create a website that will crossfade from the page you are looking at to the page you navigate to.
The way I have it set up for the moment is that each page is its own MC. Each page's MC has one labeled section for the fade in, one labeled section for the "at rest" state, and one labeled section for the fade out. Each MC is in its own layer at the same frame of the root timeline (all stopped at the beginning of their respective fade in sections).
My trouble is coming with the navigation buttons. On clicking one, I can get one MC to fade out, but I can't seem to get the second MC to fade in at the same time. The AS on each button looks like:
Code:
on (release) {
_root.homeMC.gotoAndPlay("TRANS_OUT");
_root.contactMC.gotoAndPlay("TRANS_IN");
}
It feels like I'm just overlooking something simple. At least in my mind, I just need to get each button to do two things at once. Am I on the right track, or is the scripting for this crossfade transition a little more intricate than I assumed?
Thanks in advance... I appreciate any help people could offer.
PS... I did do a pretty thorough search through the forums in the last 2 hours, and was able to find plenty on transitions, but wasn't able to come up with anything on this specific type of crossfade transition.
Crossfading Pictures
Hello
First post here, but prolly not the last
I want an effect like they have on this site
http://www.kubanerna.se/default.asp
but i want to use loadmovienum (or whatever works the best) beacuse i want to use pictures that are on the web (so i can replace them with others when i want, without going into the .fla file ) So i used loadmovienum but i couldent figure out how to do the crossfading, if anyone know (i'm sure you do) please gimme a hint
best regards
MrH2o
Crossfading Photos For Web
Hello,
I am redesigning a site and like to incorporate a flash .swf file on the frontpage.
I have 5 photos that is cropped and I like to make a crossfade of all 5 photos and display it on one place.
In Flash MX 2004, how would you start the work?
Thank you in advance!
Gallery Crossfading
Hi guys, im trying to modify the kirupa gallery to use cross fades rather than just simply changing the alpha level, as it flickers.
I would like to make a smoother transition, where one image blends into the next, i.e. a crossfade.
Has anyone already tried doing this, or already have the code i could possibly steal
Or any other ideas on how to implement this.
Thanks
XML Crossfading Slideshow
Does anyone have a tutorial that would show me how to create a crossfading slideshow from XML? Currently I have found one that worked but as you click around the website the slideshow jumps around in the pictures and does not work properly. Here is a link to the website that is currently up.
http://www.lopers.net/students/h/hil...a/example.html
I would appreciate any help I can get. Thanks!
Crossfading Photos For Web
Hello,
I am redesigning a site and like to incorporate a flash .swf file on the frontpage.
I have 5 photos that is cropped and I like to make a crossfade of all 5 photos and display it on one place.
In Flash MX 2004, how would you start the work?
Thank you in advance!
Crossfading Photos For Web
Hello,
I am redesigning a site and like to incorporate a flash .swf file on the frontpage.
I have 5 photos that is cropped and I like to make a crossfade of all 5 photos and display it on one place.
In Flash MX 2004, how would you start the work?
Thank you in advance!
Crossfading Photos For Web
Hello,
I am redesigning a site and like to incorporate a flash .swf file on the frontpage.
I have 5 photos that is cropped and I like to make a crossfade of all 5 photos and display it on one place.
In Flash MX 2004, how would you start the work?
Thank you in advance!
Crossfading External MP3's
Hello Everyone,
I was wondering if anyone could help me out.
1: I'm trying to load external mp3's into my navbar swf to act as a sound player (intro, contact buttons will activate a different mp3)
2: I would like the current mp3 to fade out as the new mp3 is fading in.
working example is: http://www.eccentris.com/splash.htm
I am fairly new to flash and actionscripting.
Thank You for your assistance.
Joe.
Crossfading Partially Overlapped
I have to images loaded and I want to cross fade them ... can figure this part out... but what I need to know is if I can crossfade only the parts of the image that are overlapping ?
thanks again
Mike
CrossFading Slideshow Class / As2
Hi all!
I need some help please.
I am trying to make a slideshow class, wich is nearly finished, but I have some problem with setInterval ( just a guess )
Could someone check the code?
Thanks
Zsolt
[CS3] Creating A Crossfading Between Sound Loops
I am trying to make a sound crossfading between the loops (an example would be: same as in a "Winamp" media player you toggle the Crossfading function in a Modern Skin and select a duration of it). Say I got a loop of 10 seconds, altho it is not perfect as its cut of the song without a proper editing tool. Any way I could accomplish it by using the ActionScript?
Would really appreciate your time if there is any help or guidance for me.
Crossfading Slide Show : How To Load Another SWF After ?
Hi all,
Here s the excellent Todd Dominey crossfading slide show. All i want is just that after the slideshow has ended (by choosing "sequential" on the xml file) with 10 pictures of flowers for examples, i want it to load by itself another .swf (movie2.swf for example)
beginning of the code :
Code:
/****************************/
/* Crossfading slide show */
// set random # variables - each must be 0 for first 'while' loop below
var randomNum = 0;
var randomNumLast = 0;
// parent container
var container_mc = this.createEmptyMovieClip("container",0);
// movie clip containers
container_mc.createEmptyMovieClip("loader1_mc",2);
container_mc.createEmptyMovieClip("loader2_mc",1);
// preload watcher
this.createEmptyMovieClip("watcher_mc",100);
// load xml
images_xml = new XML();
images_xml.ignoreWhite=true;
images_xml.onLoad = parse;
//*********XML file
images_xml.load("images_list1.xml");
function parse(success) {
if (success) {
imageArray = new Array();
var root = this.firstChild;
_global.numPause = Number(this.firstChild.attributes.timer * 1000);
_global.order = this.firstChild.attributes.order;
_global.looping = this.firstChild.attributes.looping;
_global.fadetime = Number(this.firstChild.attributes.fadetime);
_global.xpos = Number(this.firstChild.attributes.xpos);
_global.ypos = Number(this.firstChild.attributes.ypos);
var imageNode = root.lastChild;
var s=0;
while (imageNode.nodeName != null) {
imageData = new Object;
imageData.path = imageNode.attributes.path;
imageArray[s]=imageData;
imageNode = imageNode.previousSibling;
s++;
}
// place parent container
container_mc._x = _global.xpos;
container_mc._y = _global.ypos;
// parse array
imageArray.reverse();
imageGen(imageArray);
} else {
trace('problem');
}
}
// depth swapping
function swapPlace(clip,num) {
eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
}
function loadImages(data,num) {
if (i==undefined || i == 2) {
i=2;
createLoader(i,data,num);
i=1;
} else if (i==1) {
createLoader(i,data,num);
i=2;
}
}
function createLoader(i,data,num) {
thisLoader=eval("container_mc.loader"+i+"_mc");
thisLoader._alpha=0;
thisLoader.loadMovie(data[num].path);
watcher_mc.onEnterFrame=function () {
var picLoaded = thisLoader.getBytesLoaded();
var picBytes = thisLoader.getBytesTotal();
if (isNaN(picBytes) || picBytes < 4) {
return;
}
if (picLoaded / picBytes >= 1) {
swapPlace("container_mc.loader2_mc",1);
alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
timerInterval = setInterval(imageGen,_global.numPause,data);
delete this.onEnterFrame;
}
}
}
the following : I KNOW THIS MIGHT BE HERE I HAVE TO WRITE SOMETHING about loading another SWF when the whole list is done??
Code:
function imageGen(data) {
// random, or sequential?
if (_global.order=="random") {
// choose random # between 0 and total number of images
while (randomNum == randomNumLast) {
randomNum = Math.floor(Math.random() * data.length);
trace(randomNum);
}
loadImages(data,randomNum);
randomNumLast = randomNum;
} else if
or in the following ?? sequential means it turns in the order of the list you created. But i dont want it to drop back, i want it to load another movie !!
Code:
(_global.order=="sequential") {
// start at 0, increment to total number of images, then drop back to zero when done
if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
loadImages(data,p);
p++;
} else {
trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
}
clearInterval(timerInterval);
}
stop();
Among all this code, where do i write "loadmovieNum ("movie2.swf", 0)" to get out from this string ??
thank you very much for help.. i want to create an interactivity between pictures slideshow + graphic swf's i created with graphics, drawing etc...
Argentik
Crossfading Audio In Flash Mx 2004 ?
Hey Guys. Is it yet possible to crossfade a clip of audio in Flash Mx 2004? I always get this un-smooth sound when it repeats itself or loops.
Thanks
[AS PROMISED] Tutorial To Create A Crossfading Slideshow
I have built a tutorial that shows you how to build an XML driven CrossFading Slideshow. Aside from the walkthrough, is also provides source files and insights into flash file organization.
Check it out:
Tutorial: Create an XML Driven, Cross-fading Slideshow
Loading Images At Random And Crossfading With Exceptions
Hello all. My first post. I was very reluctant indeed, thinking I could figure it out all by myself. Not so. The problem is likely in the while loop, but this makes logical sense to me.
What I'm trying to do:
Crossfade between 2 movieclips when a timer goes off. When one movieclip is alpha=0, I load a new image in it by random. But if it loads the same image that's already in the first movieclip, I want it to try again. the timer moves the playhead one frame and the other movieclip fades to alpha=100, and the other fades out. The timer and crossfading work fine. Sure, all this could probably be worked out in the timer code, but bear with me here.
In the main timeline I define a function:
ActionScript Code:
function switchUp(clipToLoadin){
switch (Math.round(Math.random()*3)) {
case 0 :
clipToLoadin.loadMovie("image0.swf");
clipToLoadin.choosen = "image0.swf";
break;
case 1 :
clipToLoadin.loadMovie("image1.swf");
clipToLoadin.choosen = "image1.swf";
break;
case 2 :
clipToLoadin.loadMovie("image2.swf");
clipToLoadin.choosen = "image2.swf";
break;
case 3 :
clipToLoadin.loadMovie("image3.swf")
clipToLoadin.choosen = "image3.swf";
break;
default :
clipToLoadin.loadMovie("image0.swf");
clipToLoadin.choosen = "image0.swf";
}
}
stop();
The variable, "choosen" will exist in both clips, called location1 and location2 and tells me via a string which image was loaded. Below I try to compare that string to make sure it doens't load the same image. The below script resides on each frame of a container with each movieclip fading in and out with an off-stage controller.
ActionScript Code:
trace(location1.choosen+" in upper layer");
trace(location2.choosen+" in lower layer");
if (_root.loadMe.location1._alpha<1) {
trace("Location 1 invisible, running function");
_level0.switchUp(_root.loadMe.location1);
while(_root.loadMe.location1.choosen==_root.loadMe.location2.choosen){
_level0.switchUp(_root.loadMe.location1);
}
}
if (_root.loadMe.location2._alpha<1) {
trace("Location 2 invisible, running function");
_level0.switchUp(_root.loadMe.location2);
while(_root.loadMe.location1.choosen==_root.loadMe.location2.choosen){
_level0.switchUp(_root.loadMe.location2);
}
}
stop();
This crashes the player, and alerts me that a script is making something funky happen.
When I comment out the while loop everything works, but sometimes it crossfades between the same image and I don't want that.
thanks so much for your help!
-Lou
[CS3] Crossfading Slide Show (Todd Dominey), 3 Seperate Slideshows On The Stage
Like others I have found Todd Dominey's script for making a cross fading slideshow. I have modified the AS and the XML to make room for multiple slideshows on the stage. However, I can't get it to work properly as only my "LAST" slideshow plays normal..
I have been trying to figure out my problem for days now, so the code has changed a bit since I started, with lots of traces and probably some "unneccecary code as well"..
Any help appreciated
Code:
/****************************/
/* Crossfading slide show */
/* Author: Todd Dominey */
/* http://whatdoiknow.org */
/* http://domineydesign.com */
/****************************/
// set random # variables - each must be 0 for first 'while' loop below
var randomNum = 0;
var randomNumLast = 0;
// load xml
images_xml = new XML();
images_xml.ignoreWhite = true;
images_xml.onLoad = parse;
images_xml.load("intro.xml");
function parse(success) {
if (success) {
//imageArray = new Array();
var root = this.firstChild;
//Variables for the slideshow
_global.numPause = 4000;//Number(this.firstChild.attributes.timer * 1000);
_global.order = "sequential";//this.firstChild.attributes.order;
_global.looping = "yes";//this.firstChild.attributes.looping;
_global.fadetime = 1;//Number(this.firstChild.attributes.fadetime);
_global.xpos = 20;//Number(this.firstChild.attributes.xpos);
_global.ypos = 20;//Number(this.firstChild.attributes.ypos);
var xmlCategories = this.firstChild.childNodes;//
////////////////////
//For each CATEGORY
trace("******************");
trace("FOR EACH CATEGORY");
//btn_spacing = 100;
for (var ka = 0; ka<xmlCategories.length; ka++) {
trace("--------------------");
trace("CATEGORY: ["+ka+"] - "+xmlCategories[ka].attributes.catName);
trace("--------------------");
// preload watcher
_root.createEmptyMovieClip("watcher_mc"+ka,_root.getNextHighestDepth());
trace("watcher created:"+eval("_root.watcher_mc"+ka));
// parent container
container_mc = createEmptyMovieClip("container"+[ka], _root.getNextHighestDepth());
// movie clip containers
container_mc.createEmptyMovieClip("loader1_mc",_root.getNextHighestDepth()+200);
container_mc.createEmptyMovieClip("loader2_mc",_root.getNextHighestDepth()+100);
// place parent container
eval("container"+ka)._x = ka*250;
container_mc._y = _global.ypos;
_global["imageArray"+ka] = new Array();
var root = xmlCategories[ka].firstChild;
//trace("root="+root);
var imageNode = root.lastChild;
var s = 0;
while (imageNode.nodeName != null) {
trace("-- while:");
_global["imageData"+ka] = new Object();
_global["imageData"+ka].path = imageNode.firstChild.nodeValue;
trace("imageData"+ka+".path = "+_global["imageData"+ka].path);
_global["imageArray"+ka][s] = _global["imageData"+ka];
trace(_global["imageData"+ka]);
trace("**:"+_global['imageArray'+ka][s]);
imageNode = imageNode.previousSibling;
s++;
trace("s="+s);
trace("-- end while");
}
// parse array
imageArray[ka].reverse();
trace("Initial call to imageGen:"+_global['imageArray'+ka]);
//Initial call to imageGen
imageGen(_global['imageArray'+ka],ka);
}
} else {
trace('problem');
}
trace("///////////////////////////////////////////////////////////////");
trace("finished parsing");
trace("///////////////////////////////////////////////////////////////");
}
//F4 depth swapping
function swapPlace(clip, num, ka) {
trace("------------------------------------------");
trace("F4 function swapPlace("+clip+","+num+","+ka+")=(clip,num,ka)");
eval(clip).swapDepths(eval("container"+ka+".loader"+num+"_mc"));
}
//F2 Define wich "loader" to load into (1 or 2)
function loadImages(data, num, ka) {
trace("------------------------------------------");
trace("F2 function loadImages("+data+","+num+","+ka+")=(data,num,ka)");
if (i == undefined || i == 2) {
i = 2;
createLoader(i,data,num,ka);
i = 1;
} else if (i == 1) {
createLoader(i,data,num,ka);
i = 2;
}
}
//F3
function createLoader(i, data, num, ka) {
trace("------------------------------------------");
trace("F3 function createLoader("+i+","+data+","+num+","+ka+") =(i,myData,num,ka)");
_global["thisLoader"+ka] = eval("container"+ka+".loader"+i+"_mc");
trace("thisLoader="+_global["thisLoader"+ka]);
_global["thisLoader"+ka]._alpha = 30;
_global["thisLoader"+ka].loadMovie("bilder/"+data[num].path);
trace("watcher_mc"+ka+"="+eval("watcher_mc"+ka));
//eval("watcher_mc"+ka).onEnterFrame = function() {
watcher_mc1.onEnterFrame = function() {
_global["picLoaded"+ka] = _global["thisLoader"+ka].getBytesLoaded();
_global["picBytes"+ka] = _global["thisLoader"+ka].getBytesTotal();
if (isNaN(_global["picBytes"+ka]) || _global["picBytes"+ka]<4) {
trace("returning");
return;
}
if (_global["picLoaded"+ka]/_global["picBytes"+ka]>=1) {
//call F4
//Set timer for next imageGen()
if(ka==0){
trace("F3 ka="+ka);
swapPlace("container"+ka+".loader2_mc",1,ka);
alphaTween = new mx.transitions.Tween(_global["thisLoader"+ka], "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, _global.fadetime, true);
timerInterval0 = setInterval(imageGen, _global.numPause, data,0);
}
else if(ka==1){
trace("F3 ka="+ka);
swapPlace("container"+ka+".loader2_mc",1,ka);
alphaTween = new mx.transitions.Tween(_global["thisLoader"+ka], "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, _global.fadetime, true);
timerInterval1 = setInterval(imageGen, _global.numPause, data,1);
}
else if(ka==2){
trace("F3 ka="+ka);
swapPlace("container"+ka+".loader2_mc",1,ka);
alphaTween = new mx.transitions.Tween(_global["thisLoader"+ka], "_alpha", mx.transitions.easing.Regular.easeOut, 0, 100, _global.fadetime, true);
timerInterval2 = setInterval(imageGen, _global.numPause, data,2);
}
delete this.onEnterFrame;
}
};
}
//F1
function imageGen(data, ka) {
trace("******************************************");
trace("------------------------------------------");
trace("F1 function imageGen("+data+","+ka+")=(data,ka)");
// random, or sequential?
if (_global.order == "random") {
// choose random # between 0 and total number of images
while (randomNum == randomNumLast) {
randomNum = Math.floor(Math.random()*data.length);
trace(randomNum);
}
loadImages(data,randomNum);
randomNumLast = randomNum;
}
else if (_global.order == "sequential") {
trace("p="+p);
// start at 0, increment to total number of images, then drop back to zero when done
if (p == undefined || p == data.length && _global.looping == "yes") {
p = 0;
} else {
trace("breaking in F1");
break;
}
//call F2
loadImages(data,p,ka);
p++;
} else {
trace("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
}
//clearInterval(timerInterval);
if(ka==0){
trace("F1 ka="+ka);
clearInterval(timerInterval0);
}
else if(ka==1){
trace("F1 ka="+ka);
clearInterval(timerInterval1);
}
else if(ka==2){
trace("F1 ka="+ka);
clearInterval(timerInterval2);
}
}
stop();
"Crossfading" Components Without Creating A Separate Movie Clip
I'm trying to figure out how to fade two components into each other without creating a seperate movie clip (i.e.:
allow the decreasing alpha channel of one image to coincide with the increasing of
another so that it looks like a crossfade.) I couldn't find anything in the tutorial about this, so I'm hoping someone can help.
|