Fading Random Transitions
basically i need help with transitions.. i only have a very small file so all the scenes are in the 1 movie
each scene has a different background, but i want the current background to fade out and the new background colour fade in when 1 of the navigation buttons is pressed.. at the moment it jus jumps from colour to colour and doesnt look very smooth.. i want the previous back ground colour to be fading out in the background as the new colour is fading in over the top of it.. and as the user could visit each section in any random order im not sure how to do this..
thanks in advance to anyone who can help
FlashKit > Flash Help > Flash Newbies
Posted on: 02-10-2004, 07:26 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Fading Transitions
Hey!
I've been looking for a VERY long time now for a tutorial/FLA that could show me how to make a transition or ("appearance") of a jpg/swf, with squares (masks?) duplicated to fade the image in/out in a rolling motion...
I could really use some help in creating this awesome effect. I could of course tween it, but hey...
Fading Transitions..
So I need some help coding button events to transition my pages..I'm new to AS so bear with me.
The only code that I have written so far to do this is..
import flash.events.MouseEvent;
//---Home button property change---\
homebtn.addEventListener(MouseEvent.CLICK, homeClick);
function homeClick (event:MouseEvent): void{
gotoAndPlay("getjargon");
}
This is the code for my home button. When someone clicks it, it goes to the frame for my home movie clip. But, the transition is very abrupt. I want to fade out the end of one clip and fade in the next movie clip. I'm not really sure what to do next...I wana write something that will fade out whats currently on the stage and then move to the selected frame?
Can I write multiple functions to one mouse event?
any help appreciated thanks.
Actionscript Trigger Fading Transitions
Hi,
My actionscript isn't very good, but if someone here can offer some pointers, I'd be most grateful.
I have a flash website with 5 navigation links. When a navigation link is clicked, the main page image on the page will fade out and a new image will load in its place (each page has a different image).
How would I go about scripting this? How can I load images into a specific place on a page and get them to fade over the one that is already there? Is this something that is possible with actionscript?
If anyone could offer an explanation or example, I'm sure I'll be able to get a good impression of how it's done.
Thanks very much...
Text Transitions Not Saving.. Not Fading And And Out.
hi, i have made a small animation/banner, and in it i have some text which fades in and out. the next word starts to fade in before the previous word has faded out completely. each word is on a seperate layer too.
its fine when i press enter and watch the animation on the stage, but when i go to preview it/export it none of the text transitions are there, the text doesnt fade in, i just appears and doesnt dissappear. so it looks like all the text is just on top of each other.
can anyone help?
thanks in advance
Navigation Transitions / Movieclip Fading In/Out
Does anyone know of a tutorial or actionscript that will allow me to make a one movieclip perform an animation then fade out, and then another movieclip fade in. These actions will take place on the click of button. HELP. Here is an example of this effect... www.jrecords.com
Fading Grid Tutorial, I Can't Figure It Out Other Transitions Needed
Hi guys, this is my first post and I'm very new to Flash. I tried to do the tutorial, I thought I followed it to the T and I can't figure out what's wrong. Nothing happens when I run it. I don't quite understand what I'm supposed to do here:
Quote:
Originally Posted by http://www.kirupa.com/developer/mx/fadegrid2.htm
Create a new layer, give it the name border and select the rectangle tool. Now, roughly draw a border around the image. The width, height and position will be set through ActionScipt, so you can place it anywhere and give it any size you want.
How do I draw the border using a rectangle? Do I draw a rectangle over my image, do I draw multiple rectangles around my image, I DON'T UNDERSTAND!
Sorry, I've spent the past 2 hours trying to do this and nothing works. I'm also curious, why didn't Voetsjoeba release the .fla?
I also need to try out some other masking transitions, but I am baffled. I've tried to modify the fade britney.fla to fit a shorter and wider image, but I can't get the circles to move any further.
I'm sorry if this post is kind of random, I'm just going looney because I can't figure any of this stuff out.
Thanks in advance! Great site BTW!
Flash Dynamic Slideshow With Fading Image Transitions
Hello, I'm trying to build a Flash slideshow with the following features:
1. Displays a series of still images with fading image transitions.
2. Gets the URL for the images dynamically at run-time (Flash vars in HTML)
3. Any number of images.
4. Preloads the images
5. Ability to set the period of time that each image is displayed for.
I have had partial success but I am just to new at Flash to build something like this in under several weeks (which I dont have). Anyone know of anything like this on the WWW or would have any tips for building one?
Random Transitions
Hello, All!
My client has requested that I create a SWF that transitions between 6 photos. He wants the TRANSITIONS (not referring to the photos) to be random. How would I script something like this?
Thanks for your help!
Random Transitions
the link below is what im trying to do:
http://www.flash-applets.com/random_...slideshow.html
how would i do this?
Random Fading In/out
I am trying to create a grid of hexagons that randomly fade in and out at different speeds to create a "twinkling" effect. Ideally, I would be able to set a a random delay between when a mc is fully faded in or out and when it starts fading back in the other direction. This is the code I have so far. All of my mc's seem to catch up to one another and I think it is because the clearInterval is effecting all of the hexagons. Thanks for the help.
var hex:Array = new Array(hex1, hex2, hex3, hex4, hex5, hex6);
function fadein():Void {
for (i=0;i<hex.length;i++){
hex._alpha++;
}
}
function fadeout():Void {
for (i=0;i<hex.length;i++){
hex._alpha--;
}
}
var fadeinInterval:Number = setInterval(fadein, (randRange(5,30), 50));
this.onEnterFrame = function() {
for (i=0;i<hex.length;i++){
if (hex._alpha > 95) {
clearInterval(fadeinInterval);
var fadeoutInterval:Number = setInterval(fadeout, (randRange(5,30), 50));
updateAfterEvent();
} else if (hex._alpha < 5) {
clearInterval(fadeoutInterval);
setInterval(fadein, (randRange(5,30), 50));
updateAfterEvent();
}
}
updateAfterEvent();
};
function randRange(min:Number, max:Number)
{
var randomNum:Number = Math.random() * (max - min) + min;
return randomNum;
}
Animated Random Transitions
I have a menu scroller with 5 buttons, each open up a portfolio section movieclip (also being scrollers).
I want each portfolio to zoom into position, then when the next button is clicked to zoom out and the respective movieclip zooms in.
Not sure how to script it, with regards to playing the fade out of the current movieclip then loading up the next movie dependent on button clicked.
cheers
Random Mc's+transitions+timeout
Hi there,
is there any possibility to load random movies into one mc, with transitions, and the movies should stay lets say 120 seconds loaded, then transition to the next random movie from lets say about six mc's....
anybody knows how to do it, or can point in some direction...?
Cheers!
Random Fading At Intervals
hi,
im trying to get an object to fade in and out at random intervals.
so, if the object is 100% opaque, i want to fade it out to alpha 0%, and if its already 0% i want it to fade in to 100%.
but i only want this to happen at a randomly defined interval (between 1-5 secs say).
anyone got any ideas?
i was trying with this code attached to the enterframe of MC i am trying to fade:
onClipEvent (enterFrame)
{
function fadeMenu(menuEon) {
trace(menuEon);
if ((menuEon == true) && (this._alpha >= 10)) {
this._alpha = this._alpha -1;
} else if ((menuEon == false) && (this._alpha <=90)) {
this._alpha = this._alpha +1;
}
}
this is the code to cycle between true and false for the "menuEon" var:
var mainInterval = setInterval(menuChange, 3000);
function menuChange() {
if (menuEon == true) {
menuEon = false;
} else {
menuEon = true;
}
}
but for some reason when the code in the MC is run, the value of menuEon never changes from true.
Fading Random Images In And Out
Hello gang!
I am really having some trouble accomplishing a particular effect. I have spent 1 1/2 days trying to do this with no luck. It doesn't help that I am lousy with ActionScripting either.
What I would like to do is this:
I have 5 images that I would like to have loaded randomly. I'd also like them to fade in and out from one to the other as well.
If anyone can provide detailed instructions, I would greatly appreciate it. As I had mentioned, scripting is not my thing, so if you could please explain it in detail-assume that I know nothing-I would greatly appreciate it.
Thanks for your time and consideration!
Kind regards,
Greg
Fading Random Pictures
Hi,
I was searching for an script for random images. Here in the forums are many, but the truth is I dont understand them very much.
Here is what I want to do:
I´m making a Home Page that at the end shows 11 pictures placed one next to the other, as a honeycomb. The pictures must change randomly among them, but with a FADE effect.
Also, I must make the pictures change randomly but not at the same time, but independant one of another, so you see a collage of pictures changing one next to the other in different times.
I´m trying to avoid doing it manually so, the script will help me a lot.
Thanks in advance for the answer.
DAVID
Arrays, Random, Fading
Hello all,
heres the situation, I am trying to make about 20 movie clips fade in and out randomly.This is the code I have and I thought it would work. I have been researching arrays, randomizing, loops and mroe for so long that my brain is no longer functional. If a scripting guru could help me I would be extremely appreciative. Thanks a bunch!!
This is on the main time line and I have a movieclip name grid on the stage. grid has all the mcs in it.
gridblocks = new Array();
for (var i in grid) {
grid[i]._alpha=0;
grid[i].fade=0;
gridblocks.push(grid[i]);
}
fadeinCount=0;
this.onEnterFrame = function() {
count=random(gridblocks.length);
gridblocks[count].fade=1;
for (var i in gridblocks) {
if (gridblocks[i].fade==1) {
gridblocks[i]._alpha ++;
// check if all blocks are done
if (gridblocks[i]._alpha==100) {
fadeinCount++;
}
}
else if (gridblocks[i].fade==100) {
gridblocks[i]._alpha--;
}
}
}
Ok, I have kept looking and I found some more code...it is great except I want my objects to do this randomly and wihtout button prompting....Can anyone help I am desperate....
object1._alpha = 0;
//////////////////////////////
//////////////////////////////
MovieClip.prototype.alphaOut = function(alpha) {
this.onEnterFrame = function() {
this._alpha = alpha-(alpha-this._alpha)/1.2;
if (Math.abs(this._alpha-alpha)<1) {
this._alpha = alpha;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.alphaIn = function(alpha) {
this.onEnterFrame = function() {
this._alpha = alpha-(alpha-this._alpha)/1.2;
if (Math.abs(this._alpha-alpha)<1) {
this._alpha = alpha;
delete this.onEnterFrame;
}
};
};
//////////////////////////////
//////////////////////////////
fadeIn.onPress = function() {
object1.alphaIn(100)
}
fadeOut.onPress = function() {
object1.alphaOut(0);
};
Best Appoach Random Fading Mcs
I have an MC which runs continuously with a addEventListener. At random moments it creates MC2s which need to fade away in a random duration. Imagine it like "waterdrops" which fade away.
I currently have them being generated at random moments with
function addchildobject(nr){
obj[nr] = new obj_pj_raindrops();
addChild(obj[nr]);
}
So far so good. Now I'm looking for best approach to fade them away. "waterdrops" also need to get a
- random duration fading away
- random scale
Idea I had
1) Have MC do all the work. -> Add an extra objvars[] array to every obj[x] e.g.
obj[x].objvars[1] = 1; // used as a counter
obj[x].objvars[2] = 20+Math.floor(Math.random()*20) // total duration to fade out
obj[x].objvars[3] = Math.random()*200 // random scale
"x" is a number increased every time a new "waterdrop" is generated.
Then use a obj[x].objvars[1]++ to increment counter and as soon as it reaches obj[x].objvars[2] remove it by;
if(obj[x]){
if(obj[x].parent != null){
removeChild(obj[x]);
}
}
And enclose/add a for() loop in addEventListener, fading away all "waterdrops" detected still pressent on stage.
Problem is, I can't manage to get an array added to the generated "waterdrops". I know I probably can predefine it in frame 1 of that MC2 but hope there's a way to add them on-the-fly.
2) I also know I probably can do the scripting within "waterdrop" itself but I didn't manage to make it remove itself when done.
Anybody any idea how to add an array within an child by array, in ohter words 'nest arrays'?
Or any other suggestion?
t.i.a.
P
Random Fading Grid
Hello;
I'd like to make a 30x30 grid system.
When Flash is launched it selects a random box in the 30x30 grid and then
displays the boxes there( alpha 0 to alpha 100) then the other 4 boxes above,bottom , left and to the right of it and then continue like this until this ends (whole grid displayed) Please , I need help.
I wrote smth like that:
function displayBox() {
startPoint = random(amH*amV);
box.duplicateMovieClip("box"+startPoint, depth);
focus = this["box"+int(startPoint)];
focusU = this["box"+int(startPoint-amH)];
focusD = this["box"+int(startPoint+amH)];
focusL = this["box"+int(startPoint-1)];
focusR = this["box"+int(startPoint+1)];
visibleBoxes.push(focus,focusU,focusD,focusL,focus R);
trace(focus+" "+focusU+" "+focusD+" "+focusL+" "+focusR);
trace(visibleBoxes);
}
displayBox();
but cant calculate further.
Random Fading Images
I'd like to have an image placeholder fade in and out random images.
The ideal situation would be for me to have the Flash pull the images from a directory so that I could add/subtract the images in the future without actually opening the Flash file. Another ideal would be to have the tween done in actionscript so that all images will have this simple fade in fade out tween.
Only having the random images and the tween in and out is essential. The dynamic part would be optional but ideal.
Can anyone point me in the right direction on this one?
Thanks,
-B
How To Make This: Random Transitions Nicely Done.
I look to this site for inspiration and help. I look to other sites for design inspirations, but I found this neat little annimation that I would love to see the fla for...anyone have any ideas on where I can see an fla of similar nature. http://www.templatemonster.com/show....g2=&order=date
Thanks.
MX Transitions - Random Movement From Left To Right?
Hi,
I've a movie clip coming into the stage using this code:
Code:
import mx.transitions.*;
import mx.transitions.easing.*;
var slideType = mx.transitions.easing.Regular.easeOut;
var motionTween = new mx.transitions.Tween(mc, "_y", slideType, -100, mc._y, 210, false);
motionTween.onMotionFinished = function() {
//play()
};
But I also want it to randomly ease from left to right roughly 5 - 10 pixels each way a few times as it comes in. Can anyone tell me how I can do this?
Thanks!
Question About Random Load And Transitions...
Hi all...hopefully my last question for a while
I have created a dynamic site with the tutorial "preloader and transition" (http://www.kirupa.com/developer/mx/p...transition.htm), but have run into a problem. Here's the actionscript I had been using in keyframe one of my main .swf to laod a random "index page" into the container clip on my stage:
choice = Math.round(Math.random()*2);
switch (choice) {
case 0 :
theClip.loadMovie("home_okai.swf");
break;
case 1 :
theClip.loadMovie("home_ayatollah.swf");
break;
case 2 :
theClip.loadMovie("home_mustafa.swf");
break;
}
This has been working great, but now that I'm using a transition MC which loads only a single .swf in keyframe 1 of the transition MC (_root.section = "home.swf"; )rather than a random load (using the above actionscript)- I need to find a way to do a random load using the dynamic transition method.
I suppose the question(s) is this:
1)Is there an easier way to do this? Can I modify the following button script to included a random script? This is the actionscript I have attached to each menu bar button:
button1.onRelease = function() {
if (_root.section != "********.swf") {
_root.section = "********.swf";
_root.transition.gotoAndPlay("closing");
}
};
I thought of making "home.swf" a blank .swf with only the random load actionscript in keyframe 1 and then having the 3 sub-movies load into that, but then the preloader will only be waiting to load the small .swf and the computer will choke when it's trying to access the (somewhat large) randomly loaded file.
Sorry if this is incoherent, but I have no idea what the hell I'm doing here.
Thanx!
Question About Random Load And Transitions...
Hi all...hopefully my last question for a while
I have created a dynamic site with the tutorial "preloader and transition" (http://www.kirupa.com/developer/mx/p...transition.htm), but have run into a problem. Here's the actionscript I had been using in keyframe one of my main .swf to laod a random "index page" into the container clip on my stage:
choice = Math.round(Math.random()*2);
switch (choice) {
case 0 :
theClip.loadMovie("home_okai.swf");
break;
case 1 :
theClip.loadMovie("home_ayatollah.swf");
break;
case 2 :
theClip.loadMovie("home_mustafa.swf");
break;
}
This has been working great, but now that I'm using a transition MC which loads only a single .swf in keyframe 1 of the transition MC (_root.section = "home.swf"; )rather than a random load (using the above actionscript)- I need to find a way to do a random load using the dynamic transition method.
I suppose the question(s) is this:
1)Is there an easier way to do this? Can I modify the following button script to included a random script? This is the actionscript I have attached to each menu bar button:
button1.onRelease = function() {
if (_root.section != "********.swf") {
_root.section = "********.swf";
_root.transition.gotoAndPlay("closing");
}
};
I thought of making "home.swf" a blank .swf with only the random load actionscript in keyframe 1 and then having the 3 sub-movies load into that, but then the preloader will only be waiting to load the small .swf and the computer will choke when it's trying to access the (somewhat large) randomly loaded file.
Sorry if this is incoherent, but I have no idea what the hell I'm doing here.
Thanx!
Random Photo Database With Fading
hi there,
hope someone can gimme a jump-start
in my mysql database i have an imagelink with a description (like "nicephoto.jpg", "this is a nice photo" and "redbike.jpg", "this is a red bicycle", etc.)
I would like to grab them and display them randomly in my flash movie.
Hope someone has een example for me of information to help me out doing this.
kind regards,
forcer
Reversal Random Fading Grid
Hello. I played around with Voetsjoeba's modified random fading grid (http://www.kirupaforum.com/forums/sh...hreadid=47220&) as code and the
results were just what I was looking for. What changes would I have to
make in order to achieve the reversal of it? For example, let's say I
have an image and I want to 'fade it out' with this random fading grid
effect. Each box would fade into a 'white box' until the whole
background is white. I tried playing around with the alphas but
couldn't find any luck. Any help would be greatly appreciated. Thanks
so much!
Code:
// Array to store the number of the movieclips
var mcs_array:Array = new Array();
// Prototype to randomize an array
Array.prototype.randomize = function() {
return this.sort(function (a, b) {
return (Math.floor(Math.random()*2) == 0) ? 1 : -1;
});
};
/*** DECLARE VARIABLES ***/
// Sets the height and width of the box
box._width = box._height = 196;
// The amount of horizontal and vertical space between each box in the grid
xspacing = box._width;
yspacing = box._height;
// The initial depth of the boxes
depth = 0;
// Sets the original box's visible property to false, making it invisible
box._visible = 0;
// Sets the border's visible property to false, making it invisible
border._visible = 0;
// The number that a box must reach before the following one starts to fade. The higher this number, the faster they will start fading and the smoother the effect will be
smoothness = 90;
/*** CALCULATE POSITIONS AND VALUES ***/
// Divides the width of the image by the width of the box, and rounds it upwards
amH = Math.ceil(image._width/box._width);
// Divides the height of the image by the height of the box, and rounds it upwards
amV = Math.ceil(image._height/box._height);
// Sets the height of the border, which is the height of the image + 1, to make sure that it would be nice and clear
border._height = (image._height+1);
// Sets the width of the border, which is the width of the image + 1, to make sure that it would be nice and clear
border._width = (image._width+1);
// Sets the x position of the border to the x position of the image. Since we added 1 to the width of the border, we will now move it half that value (1) to the left, so 0.5, to have the same space left and right between the border and the image
border._x = (image._x-0.5);
// Does the same but for the heights
border._y = (image._y-0.5);
/*** CREATE GRID ***/
for (i=0; i<amH; i++) {
for (var k = 0; k<amV; k++) {
box.duplicateMovieClip("box"+depth, depth);
cur = this["box"+depth];
cur._x = image._x+(xspacing*i);
cur._y = image._y+(yspacing*k);
mcs_array.push(depth);
depth++;
}
mcs_array.randomize(); // Randomize array
}
/*** FUNCTIONS ***/
function fadeOut(startboxnr, speed) {
fadeMC(startboxnr, speed);
}
function fadeMC(mcnr, speed) {
this["box"+mcnr].onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=smoothness) {
delete this.onEnterFrame;
continueFade(this, speed);
fadeOut(mcs_array.pop(), speed); // Fade out the last element from the array
}
};
}
function continueFade(mc, speed) {
mc.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=0) {
delete this.onEnterFrame;
}
};
}
fadeOut(mcs_array.pop(), 5); // Start fading the last element fof the array
Random Images In Flash And Fading
Alright, so... here's the deal:
I know that it is possible to randomly display images within a .swf!
But is is it possible to do the "fade in/ fade out" thing when somebody goes into another section??
I would like to have images randomly appear but since there is a lot of fading going on, for the general flow of the page, I would love if I could fade that randomly generated images too...
I hope this made sense... ?!
bep
Random Text Displaying/fading
I'm having an issue trying to get my random text to fade in and out how I want it to. Basically I have 10 rotating images as the background, they fade in for 2 seconds, stay solid for 4, then crossfade for 2 seconds to the next image. The text is supposed to fade in for 1 second, stay solid for 2, then fade out for 1, while the image is in it's solid state for 4 seconds. The text is supposed to be random as well, from a list of about 10 phrases.
I followed the tut on this site and as far as getting the random quotes to display it works great. I'm using an external file and I set keyframes to call the function when a new one needs to display.
The catch I'm running into is this:
As a dynamic text box I can't (or at least if I can I don't know how to) make it fade in and out. If I convert it to a symbol I can tell flash to make it fade in and out, but the dynamic text isn't read from the file then.
Any help would be great on this. I really need to work to get this finished soon. Oh, and as far as the dynamic text file, that is not important. The only important thing is that I get the text to fade in and out at the right times and that the quotes are randomized...
Thanks!
Tony Rad
Reversal Random Fading Grid
Hello. I played around with Voetsjoeba's modified random fading grid (http://www.kirupaforum.com/forums/sh...hreadid=47220&) as code and the
results were just what I was looking for. What changes would I have to
make in order to achieve the reversal of it? For example, let's say I
have an image and I want to 'fade it out' with this random fading grid
effect. Each box would fade into a 'white box' until the whole
background is white. I tried playing around with the alphas but
couldn't find any luck. Any help would be greatly appreciated. Thanks
so much!
Code:
// Array to store the number of the movieclips
var mcs_array:Array = new Array();
// Prototype to randomize an array
Array.prototype.randomize = function() {
return this.sort(function (a, b) {
return (Math.floor(Math.random()*2) == 0) ? 1 : -1;
});
};
/*** DECLARE VARIABLES ***/
// Sets the height and width of the box
box._width = box._height = 196;
// The amount of horizontal and vertical space between each box in the grid
xspacing = box._width;
yspacing = box._height;
// The initial depth of the boxes
depth = 0;
// Sets the original box's visible property to false, making it invisible
box._visible = 0;
// Sets the border's visible property to false, making it invisible
border._visible = 0;
// The number that a box must reach before the following one starts to fade. The higher this number, the faster they will start fading and the smoother the effect will be
smoothness = 90;
/*** CALCULATE POSITIONS AND VALUES ***/
// Divides the width of the image by the width of the box, and rounds it upwards
amH = Math.ceil(image._width/box._width);
// Divides the height of the image by the height of the box, and rounds it upwards
amV = Math.ceil(image._height/box._height);
// Sets the height of the border, which is the height of the image + 1, to make sure that it would be nice and clear
border._height = (image._height+1);
// Sets the width of the border, which is the width of the image + 1, to make sure that it would be nice and clear
border._width = (image._width+1);
// Sets the x position of the border to the x position of the image. Since we added 1 to the width of the border, we will now move it half that value (1) to the left, so 0.5, to have the same space left and right between the border and the image
border._x = (image._x-0.5);
// Does the same but for the heights
border._y = (image._y-0.5);
/*** CREATE GRID ***/
for (i=0; i<amH; i++) {
for (var k = 0; k<amV; k++) {
box.duplicateMovieClip("box"+depth, depth);
cur = this["box"+depth];
cur._x = image._x+(xspacing*i);
cur._y = image._y+(yspacing*k);
mcs_array.push(depth);
depth++;
}
mcs_array.randomize(); // Randomize array
}
/*** FUNCTIONS ***/
function fadeOut(startboxnr, speed) {
fadeMC(startboxnr, speed);
}
function fadeMC(mcnr, speed) {
this["box"+mcnr].onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=smoothness) {
delete this.onEnterFrame;
continueFade(this, speed);
fadeOut(mcs_array.pop(), speed); // Fade out the last element from the array
}
};
}
function continueFade(mc, speed) {
mc.onEnterFrame = function() {
this._alpha -= speed;
if (this._alpha<=0) {
delete this.onEnterFrame;
}
};
}
fadeOut(mcs_array.pop(), 5); // Start fading the last element fof the array
Ahhh, Random Loadmovies With Nice Transitions.
Hi, I am sure this has been done ( but not by me ). I want to have a movie clip holder with randomly does loadMovie on some external swf files. The catch is.... I want to fade the current image into the next one, as if the next image was already there behind it. I keep getting a 'jumpy' transition to the next loadedMovie. I have tried all sorts of stuff with levels, duplicateMovie, but I am sure there is an easier way (which actually works). PLEEEAASSE help, it is really annoying me.
Loading Random Swf Backgrounds With Fade Transitions
Hi there I am working with flash 8 and know some basic actionscript. I have created the code to randomly load a background every minute using setInterval. This works great. My background swf's are a few lines of actionscript to create a gradient. So I have various backgounds loading every minute. Right now there is a slight flicker. I would like to be able to code it so as one fades out the other fades in. It is something that will look so subtle but I am pulling my hair out. Please Help.
Again I would appreciate any help.
Cheers
Suggestions For A Random Fading Jpeg Gallery
Hello all,
I am on a very tight deadline to come up with a jpeg slideshow that randomly calls 1 of 15 given images in a directory. Though the images will be updated they will always have the same names, pic1, pic2, etc.
I can load them all in at the beginning and use them that way, or load them randomly 1 at a time as needed by a function.
I'm just looking for suggestions in terms of structure and setup. I can do this dynamically with all code or I can just load them in and come up with a design solution.
The images need to load, fade in, remain on screen for a bit, and fade out. Then begin again with a new random image.
I know many people have probably built something like this before, so any and all suggestions would be appreciated.
Thanks in advance for any advice!
David
Suggestions For A Random Fading Jpeg Gallery
Hello all,
I am on a very tight deadline to come up with a jpeg slideshow that randomly calls 1 of 15 given images in a directory. Though the images will be updated they will always have the same names, pic1, pic2, etc.
I can load them all in at the beginning and use them that way, or load them randomly 1 at a time as needed by a function.
I'm just looking for suggestions in terms of structure and setup. I can do this dynamically with all code or I can just load them in and come up with a design solution.
The images need to load, fade in, remain on screen for a bit, and fade out. Then begin again with a new random image.
I know many people have probably built something like this before, so any and all suggestions would be appreciated.
Thanks in advance for any advice!
David
Random + Fading + Preloadbar Gallery/bacgkround Change
Hi, I have to code asap, a fading, random, with preloader photogallery. It would be used as a background random change, the thing is that I need that the previous images stays in screen while preloading the following and the transition should be betwewn images.(should notbe able see white in transitions) the random may not me a problem, I can forget about that.
Also, is there a way to list with numbers, the pictures that will be loaded, or add a next prvious button?
Well is kind of tricky, but if anyone knows some tutorial or has any, it would be great to have a look, cause everything I can find will not show any image while preloading the next one (could be also cool to see a loadbar).
well, thanks to all.
Flash 5: Stuck Trying To Combine Random Colours With Smooth Transitions.. Please Help
ok im trying to create a clip of a dot that fades randomly between four pre defined colours whilst also randomly varying in the size range 0 - 100%. i am trying to create a smooth size tween also.
this is my attempt:
size = random(100);
setProperty ("purple", _xscale, size);
setProperty ("purple", _yscale, size);
myArray = ["0x399FB6", "0xCBC5D7", "0x5A3084", "0xffffff", "0x399FB6"];
myArray[0] = 0x399FB6;
myArray[1] = 0xCBC5D7;
myArray[2] = 0x5A3084;
myArray[3] = 0xffffff;
myArray[4] = 0x399FB6;
col = random(4);
myColor = new Color(purple);
purple._alpha=100;
myColor.setRGB(myArray[col]);
where purple is the next key frame instance of the dot with a tween between the two (ie purple and the one with the above script).
this script randomly changes both the size and colour in the desired way but for nothing can i get the dots to fade / change smoothly
help with this and i will be forever indebted..
here is the fla
Fading Random Ordered Text From External Text File
Newb to flash. Watching various tutorials trying to come up to speed.
What I would like to create is a small flash ap that displays text in a randowm order from an external text file. I wantot create a small text box in the sidebar of a web page where customer references are displayed in random order. (so users dont see the same ones each time) I want the text to fade in and out as the next text item is displayed.
Can someone kindly point me to a resource that is close to helping to create this? Or; is flash the wrong way to go for this?
Curt
Edited: 12/02/2006 at 12:22:31 PM by cwrig
Transitions Between External SWFs W/ Symbol Transitions - HELP
So I've been pouring over this forum looking for a solution to my problem. (this is probably a little lengthy, so I apologize in advance).
I've been using the techniques in the tut: Transitioning between external SWFs
to create a little flash movie to be used for work. I've created files to mimic the tut, ALMOST to the T.
Somethings that I have changed... I'm using a transition on a symbol to fade in and out. I'm also using a gray gradient in the first 12 frames as a "woohoo, look at me" intro.
So my problem is that when I start the mainmovie.swf file it's supposed to pull in the first swf file (section1.swf) and go through the same actions as the above tut. But what is REALLY happening is that section1.swf starts, but it's only the gray gradient. When I click on button 2, I get the same gradient, only this one loops (which isn't supposed to happen). Same thing with section 3.
I've gone through the code (which should be right, because I cut/pasted into flash, changing only the file names), but also doesn't mean much, because this is my first dive into AS.
Yes, I have five buttons and only three external fla files, I figured, let me get these working first, and then do the other two buttons.
On top of this, I wanted to get the entire sequence to play and loop three times. But my main concern is to get the buttons working. I would attach the files, but they are too big, even zipped.
HELP PLEASE! Thank you in advance,
~V
Fading And Reverse Fading Text
I'm so new to this it's sick. But I figure I can take a few days and learn as much as I can. I'm building a website wherein I'll have a splash page before entering the main contents of the site.
I'm using Flash 5. On the splash page I want to know how to create a text object that appears in a 'reverse fade' fashion. I imagine a 'reverse fade' function can be done with any object or graphic - I've seen it on these awesome websites listed at FK.
I don't know if I'm evening asking this question right. I'm able to use CoffeeCup Firestarter and make things appear and fade easily (duh - who couldn't with that program) but can't view the code the Firestarter program produces in order to learn how it happened.
Appreciate any help someone could give me.
Thanks,
Jeff
Fading In And Fading Out With Multiple Photos
Can someone please tell me how I can do a fade in fade out on photos? I am wanting to have about 6 photos and each photo is suppose to fade into another. I have searched Google for this but got nowhere. Thanks in advance.
Alpha Fading Not Fading
Hi im designing a flash intro/header for a website although the alpha fading effects im using show up and work perfectly while viewing the animation in flash mx when exported to .swf the fades do not take place at all. Any suggestions as to what the problem might be the main animation is in a movie clip (ive done this laods of tiems before and it works).
Fading In, Fading Out, Resize...
hi there... because no one reacted on my previous topics i decided to start all over again... this time i actionscripted the whole thing... let me discribe 'the thing' and 'the problem'. happy reading
The thing is a kind of photogallery ( i know that there already are a lot of gallery, but i wanted to make one myself...). I want to let photo's to fade in and to resize when loaded en to fade out when loading another one... fading in and resizing isn't to difficult... but sometimes it won't fade in and won't resize... i really don't get it. This only happens 1 out of 10 times. But when i try to intergrate the fade out it goes wrong 50% of the time... who can help me??
actionscript:
Code:
_root.finished = 100;
time = 0;
foto = new Array("foto6.jpg", "foto1.jpg", "foto2.jpg", "foto3.jpg", "foto4.jpg", "foto5.jpg");
current = 0;
function checkfadein(){
if(_level2._alpha = 0.000000000){
fadein = setInterval(fadeIn, 60);
} else
_level2._alpha = 0.000000000;
fadein = setInterval(fadeIn, 60);
}
function resizepic(){
_root.finished = 0;
_level2._alpha = 0.000000000;
checkfadein();
_level2._y = 100;
_level2._x = 100;
_level2._yscale = 20;
_level2._xscale = 20;
}
function fadeIn() {
_root.fade = "fading in";
_root.finished = 0;
_level2._alpha += 10.00000000;
if (_level2._alpha>=95) {
_root.finished = 100;
_root.fade = "faded in";
clearInterval(fadein);
}
}
function fadeOut() {
_root.fade = "fading out";
_root.finished = 0;
_level2._alpha -= 10.0000000000;
if (_level2._alpha <= 5) {
_root.fade = "faded out";
clearInterval(fadeout);
}
}
function preload() {
loadMovieNum("zwolle/"+dir, 2);
_level2._y = 500;
attachMovie("loader", "loader", 1001);
loader._y = 150;
loader._x = 300;
loaded = 0;
total = 100000;
this.onEnterFrame = function() {
total = _level2.getBytesTotal();
loaded = _level2.getBytesLoaded();
percent = (loaded/total)*100;
loader.txtpercent = Math.round(percent)+"%";
loader.balk._xscale = percent;
if (loaded>=total) {
removeMovieClip("loader");
resizepic();
delete this.onEnterFrame;
}
};
}
function changepic() {
_root.finished = 0;
if (current<foto.length-1) {
current++;
} else {
current = 0;
}
dir = foto[current];
//fadeout = setInterval(fadeOut, 60);
preload();
}
stop();
i also attached the fla... when you use it... make a folder with the name "zwolle" and put some .jpgs in the folder with the name foto1.jpg, foto2.jpg... foto6.jpg
i would really appreciate any kind of help please...
Picture Fading In/ Fading Help
Hey gang I am trying to get a picture to fade in on my intro. And for the life of me cant get it done. I am have adjusting the easing but that seems to have no effect. I just have images popping up essentially I just can get them to start from a point where they are invisible, how do I do it?
Fading In, Fading Out, Resize...
hi there... because no one reacted on my previous topics i decided to start all over again... this time i actionscripted the whole thing... let me discribe 'the thing' and 'the problem'. happy reading
The thing is a kind of photogallery ( i know that there already are a lot of gallery, but i wanted to make one myself...). I want to let photo's to fade in and to resize when loaded en to fade out when loading another one... fading in and resizing isn't to difficult... but sometimes it won't fade in and won't resize... i really don't get it. This only happens 1 out of 10 times. But when i try to intergrate the fade out it goes wrong 50% of the time... who can help me??
actionscript:
Code:
_root.finished = 100;
time = 0;
foto = new Array("foto6.jpg", "foto1.jpg", "foto2.jpg", "foto3.jpg", "foto4.jpg", "foto5.jpg");
current = 0;
function checkfadein(){
if(_level2._alpha = 0.000000000){
fadein = setInterval(fadeIn, 60);
} else
_level2._alpha = 0.000000000;
fadein = setInterval(fadeIn, 60);
}
function resizepic(){
_root.finished = 0;
_level2._alpha = 0.000000000;
checkfadein();
_level2._y = 100;
_level2._x = 100;
_level2._yscale = 20;
_level2._xscale = 20;
}
function fadeIn() {
_root.fade = "fading in";
_root.finished = 0;
_level2._alpha += 10.00000000;
if (_level2._alpha>=95) {
_root.finished = 100;
_root.fade = "faded in";
clearInterval(fadein);
}
}
function fadeOut() {
_root.fade = "fading out";
_root.finished = 0;
_level2._alpha -= 10.0000000000;
if (_level2._alpha <= 5) {
_root.fade = "faded out";
clearInterval(fadeout);
}
}
function preload() {
loadMovieNum("zwolle/"+dir, 2);
_level2._y = 500;
attachMovie("loader", "loader", 1001);
loader._y = 150;
loader._x = 300;
loaded = 0;
total = 100000;
this.onEnterFrame = function() {
total = _level2.getBytesTotal();
loaded = _level2.getBytesLoaded();
percent = (loaded/total)*100;
loader.txtpercent = Math.round(percent)+"%";
loader.balk._xscale = percent;
if (loaded>=total) {
removeMovieClip("loader");
resizepic();
delete this.onEnterFrame;
}
};
}
function changepic() {
_root.finished = 0;
if (current<foto.length-1) {
current++;
} else {
current = 0;
}
dir = foto[current];
//fadeout = setInterval(fadeOut, 60);
preload();
}
stop();
i also attached the fla... when you use it... make a folder with the name "zwolle" and put some .jpgs in the folder with the name foto1.jpg, foto2.jpg... foto6.jpg
i would really appreciate any kind of help please...
Random Random Random Timer... Problems
Heyy guys. I know you guys know this stuff backwards & forwards so maybe you can help.
This is a 2 part problem. Part 1 is Im trying to create a timer that functions at random intervals, the function in this case is playing a MC of a car driving on a freeway in 1 to 10 second intervals to give the feeling of, well, randomness. (I've attatched the .fla file if that'll help).
So it works, but not quite as it will generate intervals only twice before it repeats the second interval over and over. So the car will 'drive' in say, 7 seconds the first time and then it will drive in 3 seconds, then again in 3, and in 3 and in 3 seconds. Ive tested it so much I know its not coinsidence.
Here's the code Im using (located in the freeway MC):
var interval:Number = random(10)+1;
function someCodeToRun() {
_root.freeway.diffcars.drive01.gotoAndPlay(2);
}
setInterval(this, "someCodeToRun", interval*1000);
Part 2 is I also wanted the cars to be different colors, which is why there is a diffcars MC with different frames of cars, but now Im not even sure I was headed in the right direction with that.
Ultimately Id love to have different colored cars driving on the freeway at different intervals. Can anyone figure this out?
Color Burn Using SetTransform. Can Burn Fading In But How Do You Burn Fading Out ? :)
I have found out how to burn multiple movie clips using this code:
PHP Code:
MovieClip.prototype.fadeIn = function() {
var t = 0;
var ease = 25;
var myColor = new Color(this);
var cto = myColor.getTransform();
myColor.setTransform({ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0});
var cWhite = myColor.getTransform();
this._alpha = 0;
this.onEnterFrame = function() {
this._alpha += 10;
if (this._alpha>100) {
this._alpha = 100;
t++;
for (var c in cWhite) {
cWhite[c] += (cto[c]-cWhite[c])/ease;
}
myColor.setTransform(cWhite);
if (t>400) {
myColor.setTransform(cto);
delete this.onEnterFrame;
}
}
};
};
pic1.fadeIn();
pic2.fadeIn();
This burns/fades in... however i need a similar function to burn/fade out...
If anyone can help me that would be great
Many Thanks
PLEASE HELP - URGENT Load Random Swfs From Individual Random Sets
I have two target mcs I would like to load different random swfs into
I have eight folders (a-h), each with 12 swfs (001-012)
I need to load a random swf (001-012) from a random folder (a-h) into the "card1" mc
I have figured out how to specify which one I want:
loadMovie("a/a001.swf","card1")
stop();
however, I need it randomized....
then, I need to load another random swf into my "card2" mc (001-012) from another random folder (a-h, ...except for the folder from which the first swf was loaded)
can somebody please help??????
Random Movie Clips To Play For Random Amount Of Time
hi,
i am loading external movieclips randomly into 4 seperate emptymovies, i now need a way to get these random clips that i am loading to play for a random amount of time and then load the next clip.
i need some help with the code...
how do i get the clips to loop, then assign each a random number and have flash check if the random num is = to current frame...if it is, have that clip stop and a new one load?
i have no idea how to write the code for this
any help would be great
thanks
this is what i was given so far..but don't know what to do with it.
Code:
var rnd = Math.round(Math.random(mc._totalframes));
mc.onEnterFrame = function() {
this._currentframe >= this._parent.rnd ? unloadMovie(this) : null;
}
Script Needed: Random Picture On Random Place By Click
I have a small question about a script I'm trying to find. I don't have a lot of experience with Flash, but I have to do this thing for school for which I need this script for my website.
I need a script which does the following: When you click on a button (or just on any place if the first is not possible) with you mouse, there appears a random picture (one out of ten or something) on a random place in a field (so not the whole page).
I hope you understand what I mean. I don't know the script, I only know that it's supposed to exist :) Does anybody know this script or where I can find such a script?
Thanks for helping me!
Elfie
Help: Multipule Random Positioned Duplicate Random Movie
Does anyone know a way that i can produce a button that when rolled over will duplicate x amount of movies each with random _x and _y positions? Basically i have a movieclip that will
gotoandPlay(math.Round((math.Random()*10)+1)
which randomises that frame that is played. This instance will then do some form of tweening and then gotoandPlay(1) again. I need a script that will then keep generating more duplicate movie clips whilst a button is moused over. i tried the following
on(mouseover){
i = 0;
rand_num = math.Round((math.Random()*29)+1);
while(i<20) {
duplicateMovieClip(_root.movie, "movie"+i,i);
setProperty("movie"+i, _x, _root.movie._x+(rand_num*5);
setProperty("movie"+i, _y, _root.movie._y+(rand_num*5);
i++
}
}
where movie = movieclip name
but this seems to generate all the clips on top of each other @ different depths. I want movies that are all in different positions. Can you help?
Random Movieclip @ A Random Partly Defined Position
Ok I´ve searched this forum to death but i didn´t REALLY
find the answer to my question! I think it can´t be that
difficult but i´m new to action-script and so i gotta hope
u´ll know the answer :
I´ve got an movie. (uh yeah ^^) in this movie there are
many movieclips that contain animations. now i want these
mcs to appear randomly @ a random position of a few defined
positions.
I really got NO idea how to do this !*prayinforyahelp*
ok thx 8]
|