Fading An Image
Hi
Can anyone help? I have Flash 8 and I am tyrying to do no more than take an image and "fade it into" the same size (then fully shown) ultimate image.
I have tried using the probably excellent action scripts available - but nothing works.
To an expert this is Bread and Butter stuff I guess??
Can anyone help?
Also - any advice of the best site to find these types of very useful action scripts?
Thanks
Carl
Adobe > Flash General Discussion
Posted on: 11/25/2008 07:10:56 AM
View Complete Forum Thread with Replies
Sponsored Links:
Fading A Black & White Image Into A Colour Image
I would like to load an image and then gradually and linearaly change the image from black and white into a full colour image over a set period of time. I would prefer to not have multiple images preloaded each with increasing colour saturation; as this produces too large a file and isn't linear. Can this be done elegantly please ?
View Replies !
View Related
Fading Image Over Previous Image
Hi there! Could need some help.
I'm making a movie with 8 different toppics/pages/sections. News, History, Products, Contact etc.
For each section I have a different background (in my case a different sky color). How do I manage that when a user chooses something in the menu, the sky/clouds slowly change color?
I think it can be done in two ways:
1. applying RGB actionscript (like the Advanced effect) to the sky/cloudimage (this image stays the same, only color should change) with some kind of a time interval.
2. make 8 movieclips of the different sky/clouds and fading them.
For example: how to change the yellow background sky/clouds of News into the green sky/clouds of Products when a visitor changes his choise in the navigation menu? etc.
Any ideas?
Hope someone can help me.
Thanx a lot!
G.
View Replies !
View Related
Fading An Image
What I want to do is to fade in an image on rollOver.
I've the following code:
//this is what I have in the firs frame
function fade_mc(MC){
trace(MC._alpha)
while(MC._alpha < 100) {
MC._alpha++
trace(MC._alpha)
}
}
setProperty(mc_loader,_alpha,0);
//this is what I have in the moviclip(mc_loader)
onClipEvent(data){
_parent.fade_mc(this)
this._width = 79
this._height = 53
}
//And this is what I have in the button where I rollover.
on (rollOver) {
loadMovie("bad.jpg","_parent.mc_loader");
}
I made those trace's in the firs frame code to see if it's actually fading in the image... And it is but It's too fast that I can't see any diference...
Hope u could help me out with this cause my head is getting bad around this!
View Replies !
View Related
Fading An Image In And Out
how do i make an image appear to fade in and fade out? i swear there is a tutorial somewhere but i cant find it, so could someone help me out or point me in the right direction as to where its hiding please?
thanks,
View Replies !
View Related
Fading Image In And Out
Hi there,
Can anyone help with this ...
Got 6 buttons in a menu, each relating to a different background image.
When I hit button 1, image1 appears on the screen
when i hit button 2, image2 appears on the screen in place of image1
and so on ...
When an image is on the screen, I want the next image to fade in over the last image -- e.g. I click button 5 and it appears on the screen -- I then click image 2 and while image5 fades out, image 2 fades in ... and on and on and on.
anyone know where I should start with this?
Any help/suggestions you can give are greatly appreciated
Cheers
G
View Replies !
View Related
Fading Out An Image
Can someone tell me how to fade out an image like in photoshop?
I've already tried lots of things but I can't find a solution :s.
Maybe with masks and let the mask fade out into an invisible part or something.., but this doesn't works. :'(
I realy hope that someone can help me out
I'm sure you can
This is what I mean : Fade out image
Thanx in advance, sya
View Replies !
View Related
Help With Fading Image
i've been trying to get this right all night and i'm about ready to give up. how can i get an image (rather large) to just fade into the bakground before anything else shows up on the page? i.e. the background i have is white, the image is bluish. i want it to fade from white to the image, how can i get it to do that? thanks in advance.
View Replies !
View Related
Image Not Fading
I have text converted into a graphic. I have set it up to fade in and out, as I've done a thousand times before...works fine in the preview but not when I test it. It just appears...then stays there. I am doing everything right, but am stumped, any ideas?
View Replies !
View Related
Image Fading Help Please
Hi
Can anyone help me out with image fading.
I have a flash file with 9 buttons, once a button is clicked eg: button 6, it will go to frame 6 which will fade in an image. Then say on this frame you click button 3, it will go to frame 3 which will fade in another image.
Now, is there a way of displaying an image from the frame you have just come from, in the new frame?
For example, say im on frame 6 and then click button 3 and go to frame 3, but i want the image in frame 6 to show up in frame 3.
Thanks
View Replies !
View Related
Fading A Image
I am new to Flash use Dreamweaver alot I made a slide show that works but trying to make it so when the image comes into view it is smoother I think the term is fade in and fad out BUT can not figure out how to make it do that
I use a older version flash 6
Thxs Steve
View Replies !
View Related
Image Keeps Fading
i downloaded this handy slideshow [credit to the guy in the code]
The script works fine, but there's something i can't do. I'm that well versed in actionscript, so all help is appreciated.
I want to be able to place a picture on top of the slideshow [like on the top layer]. Just a simple logo on the right hand side. Whenever i insert the picture, it stays for the first image, but then also fades out with the first image. All i want is to be able to keep the image in the same place the whole time.
Is this possible? Can anyone help me with this problem?
here's the code
cheers in advance
Attach 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;
// 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;
images_xml.load("images.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;
}
}
}
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 (_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();
View Replies !
View Related
Image Fading
Hi
Can anyone help me out with image fading.
I have a flash file with 9 buttons, once a button is clicked eg: button 6, it will go to frame 6 which will fade in an image. Then say on this frame you click button 3, it will go to frame 3 which will fade in another image.
Now, is there a way of displaying an image from the frame you have just come from, in the new frame?
For example, say im on frame 6 and then click button 3 and go to frame 3, but i want the image in frame 6 to show up in frame 3.
Thanks
View Replies !
View Related
Fading An Image
Hi,
Using Flash MX
How do you fade an image gradualy revealing it, from the top left corner to the bottom right.
i.e. a black movie, the image in the centre as a background, a black box layer covering the image which fades on a diagnol from the top left corner to reveal the backgound image.
I figure it must be using the alpha value and a motion tween as with a standard image/text fading, however I am unsure how to reveal in the diagnol manner.
Thanks.
View Replies !
View Related
Fading An Image
How do you fade a graphic on mouseover, and then have the graphic return to its original alpha on mouseout?
Basically what I want to do is have the graphic fade to around 50% alpha on mouseover and then fade back to 100% alpha on mouseout.
I am really stuck on this, any help is appreciated.
Thanks
View Replies !
View Related
Image Fading And CPU
Sup All!
I've heard there are alot of knowledgable flasher's here.(Flash MX not flash your privates lol!)
So i've got a question about image fading.
In my movie i'm fading a prety large image (750x300) and its pinging my CPU at 60% 8-0.
I was wondering if this just comes wih fading a large image or would fading a mask over the image be more efficient?
Here's the Movie
The background fades every 20 seconds.
And thanks in advance for sharing your know-how
[edit]Flash MX 2004 Pro[/edit]
View Replies !
View Related
Fading An Image
Hi,
Using Flash MX
How do you fade an image gradualy revealing it, from the top left corner to the bottom right.
i.e. a black movie, the image in the centre as a background, a black box layer covering the image which fades on a diagnol from the top left corner to reveal the backgound image.
I figure it must be using the alpha value and a motion tween as with a standard image/text fading, however I am unsure how to reveal in the diagnol manner.
Thanks.
View Replies !
View Related
Fading An Image
How do you fade a graphic on mouseover, and then have the graphic return to its original alpha on mouseout?
Basically what I want to do is have the graphic fade to around 50% alpha on mouseover and then fade back to 100% alpha on mouseout.
I am really stuck on this, any help is appreciated.
Thanks
View Replies !
View Related
Image Fading And CPU
Sup All!
I've heard there are alot of knowledgable flasher's here.(Flash MX not flash your privates lol!)
So i've got a question about image fading.
In my movie i'm fading a prety large image (750x300) and its pinging my CPU at 60% 8-0.
I was wondering if this just comes wih fading a large image or would fading a mask over the image be more efficient?
Here's the Movie
The background fades every 20 seconds.
And thanks in advance for sharing your know-how
[edit]Flash MX 2004 Pro[/edit]
View Replies !
View Related
Dynamic Image Fading?
Eh, I am a complete Flash Newb and I need some help. I need flash to pull image files from a folder, fade them in, pause 5 seconds, fade image out, fade in new image.. etc until it runs out of images. Is there any way actionscript can do this???
I should have stuck to programming PHP.. so much easier..
View Replies !
View Related
Image Fading Problem
The flash file I have attached below works fine except for one problem and if anyone can help I'd really appreciate it.
The problem is when I select a second image from the thumbnails the main image should fade away before the new one fades in, but instead the old one just vanishes instantly.
I can't see why this is as the loadOut function should work for the main image in the same way as it works for the thumbnails remaining to be loaded text.
I've been trying to sort this out for ages, its driving me mad!
View Replies !
View Related
Fading Image On Top Of Current 1
hi,
I have 4 buttons and i have 4 images. When the user clicks the second button, i want the 2nd image to fade on top of 1st image. And when the user clicks the 3rd button, i want the 3rd image to fade on top of the 2nd image. And, if the user then clicks on the 1st button, then i want the 1st image to fade on top of current image (3rd image).
here is an example of what i'm looking for:
http://69.20.52.206/laring/portfolio/main3.html
click the buttons on the above site, see how the images in the middle rectangle fade on top of the current ones when you click the different buttons? that's exactly what i want.
I tried searching for tutorials that would explain this, but no luck.
Thanks,
Baljinder
View Replies !
View Related
Simple Fading Image
i'm trying to do a simple animation that i can't figure out. first i need it to start with a blank frame, or a white background. then fade to a large image that takes up the whole workspace. that's it. i just can't figure it out. thanks in advanced.
View Replies !
View Related
Protonradio.com Image Fading
http://www.protonradio.com/ See the shiloh opencloud photo fading thing!? How is this done? I'm a newbie, I need to have this feature for a site I'm working on. Can someone please for the love of god tell me how this is done or point me in the direction of a tutorial that will teach you simply how to fade photos into one another and then loop!? It's seen all over the internet, please someone help, it's absolutely critical! Sorry to sound so desperate, but it's true, I am!
View Replies !
View Related
Fading External Image
First up, I'm embarassingly new at flash. I've made an effort to teach myself Actionscript through a small gallery and have managed to piece things together except for this brick wall.
I'm wondering how a fade in would be accomplished on an external image. Here is what I have so far:
*Main Page*
stop();
var myloader:Loader = new Loader();
forests.addEventListener(MouseEvent.CLICK, menu1);
function menu1(event:MouseEvent):void {
this.gotoAndStop(2);
}
(forests is just an example of the buttons on the main page. Each one goes to another frame in the movie)
*Forests*
forests1.addEventListener(MouseEvent.CLICK, f1);
function f1(event:MouseEvent):void {
var request:URLRequest = new URLRequest("FORESTS1.jpg");
myloader.load(request);
addChild(myloader);
myloader.x=80;
myloader.y=127;
}
(Again, forests1 serving as an example. The idea here is to touch the flash file as little as possible when it's done and just upload new images and maybe add the odd button when called for)
---
I searched the forums and found this post:
http://board.flashkit.com/board/show...ternal+im age
But found I'd encounter an error whenever I added function changeAlpha and below (I noticed the way the image was loaded was different from in my example and I tried it both ways). I'm also not entirely sure how that last bit exactly works.
Thank you in advance for your time and help.
View Replies !
View Related
Fading Image Cycle
Hi,
I have a simple gallery that is cycling through images... the problem is that once it hits the 12th image, it stops fading and just flashes the images. This happens with the total set to 24 images, 12 images, 17 images, and different images. Any ideas?
Code:
function fademe(mc,starta,enda) {
easetype = mx.transitions.easing.Strong.easeOut;
fadeit = new mx.transitions.Tween(mc,"_alpha",easetype,starta,enda,1.5,true);
}
total = 24;
i = 1;
function shuffle() {
currimg = _root["img"+i];
trace("i = "+i+"; total = "+total);
if (i >= _root.total) {
i = 1;
nextimg = _root["img"+i];
} else {
i++;
nextimg = _root["img"+i];
}
trace("current = "+currimg);
trace("next image = "+nextimg);
fademe(currimg,100,0);
fademe(nextimg,0,100);
}
setInterval(shuffle,3000);
stop();
Thanks!
View Replies !
View Related
Image Fading With Pauses
Hi all,
I'm a new convert to ActionScript from PHP. I've been scouring Google for three days now trying to teach myself enough ActionScript to get this job done, but I just cannot figure it out. Any help would be greatly appreciated.
Here is the effect I'd like to control and execute via ActionScript:
http://www.operavista.org
My file is set up like this: Four layers. One is an actions layer, the others are the images which are fading (movie clips). It's all on one frame.
Here's the code I've written to try to make it happen:
Code:
// set clips
movieClips = new Array();
movieClips[0] = mcCabildo;
movieClips[1] = mcPirates;
movieClips[2] = mcFolksongs;
// set all clips to X = 0, Y = 0 and Alpha = 100
for(i=0; i < movieClips.length; i++) {
movieClips[i]._x = 0;
movieClips[i]._y = 0;
movieClips[i]._alpha = 100;
}
clipnum = 0;
maxclips = 2;
alphanum = 100;
slowfade = 2000;
fastfade = 40;
function fadeClip() {
clearInterval(timerNum);
if (alphanum == 0) {
alphanum = 100;
clipnum++;
if (clipnum > maxclips) {
clipnum = 0;
}
} else {
alphanum--;
}
movieClip[clipnum]._alpha = alphanum;
if (alphanum == 100) {
timerNum = setInterval(fadeClip, slowfade);
} else {
timerNum = setInterval(fadeClip, fastfade);
}
}
timerNum = setInterval(fadeClip, slowfade);
Please forgive my ignorance if this looks ridiculous. Basically what should happen is:
Show Image, wait for 2 seconds, then fade alpha into next Image.
Any and all help is greatly appreciated.
Steve
View Replies !
View Related
Fading Mc, With Image Inside It.
I have image inside movie clip, both have white background. When I set mc alpha to 50, mc looks more faded that the image, I can see image's white background, it's only lightly transparent. Is there any way to prevent this? Thanks!
View Replies !
View Related
Fading Out A Scrolling Image
I have a some scrolling images but want them to fade out at either end. I was wondering whether anyone could help me out here. My scrolling images are programmed using the following actionscript and are directly on my scene. If I put this actionscript into a movieclip I could get a gradient mask i created to work and so create the fading out effect however then this made my larger images come in the corner of the scene when they were meant to be in the centre and so didn't work.
Does anyone have any idea of how else I could create the effect I want?
Thank alot for your time.
ActionScript Code:
this.createEmptyMovieClip("container",3);
var imagesNumber:Number = 9;
for (i=1; i<=imagesNumber; i++) {
container.attachMovie("thumb"+i,"thumb"+i+"_mc",i);
myThumb_mc = container["thumb"+i+"_mc"];
myThumb_mc._y = (i-1)*myThumb_mc._height;
myThumb_mc._x = (Stage.height-myThumb_mc._height-350)/2
myThumb_mc.largerImage = i;
myThumb_mc.onRelease = function(){
_root.attachMovie("image"+this.largerImage,"large_mc",2);
large_mc._x = (Stage.width - large_mc._width+150)/2;
large_mc._y = (Stage.height - large_mc._height+50)/2;
large_mc.onRelease = function(){
this.removeMovieClip();
}
}
}
container.onEnterFrame = function() {
this._y += Math.cos((-_root._ymouse/Stage.width)*Math.PI)*15;
if (this._y>50) {
this._y = 50;
}
if (-this._y>(this._height-Stage.height+50)) {
this._y = -(this._height-Stage.height+50);
}
}
View Replies !
View Related
Masking A Fading Image
I hope someone can help me with my project. I'm learning flash but still labeled as a newbie. I'm not sure if this effect is even possible but I will ask. The problem is I created a flash movie with a matrix style text effect that scrolls down the page. I also created a jpeg involving basic random #s (0s and 1s) that cover the entire page. All I intend to do is have the matix code animation running in the foreground while the movement of the mouse reveals the jpeg #s page in the form of a small radius around the mouse (the mouse still has to be showing). This is the tricky part that I cannot find anywhere, I need that mask effect to show at a fading pace. If the mouse moves over a certain portionof the background jpeg, that portion will show as soon as the mouse is hovered over it at 100% but start to fade. The fading has to be at a constant pace (say an overall period of 2 seconds), but the revealing effect has to be only when the mouse moves.
I'm not even sure how to implement the masking part of this because the origonal flash movie project is over 15 layers by itself. Another problem I may see coming is whether I could even used my finished flash project as a background in an html page. I will create the page using dreamweaver mx and already created the origonal flash movie with flash mx.
Any help will be greatly appreciated. Thanks.
Joe
View Replies !
View Related
Image Fading Problem
The flash file I have attached below works fine except for one problem and if anyone can help I'd really appreciate it.
The problem is when I select a second image from the thumbnails the main image should fade away before the new one fades in, but instead the old one just vanishes instantly.
I can't see why this is as the loadOut function should work for the main image in the same way as it works for the thumbnails remaining to be loaded text.
I've been trying to sort this out for ages, its driving me mad!
View Replies !
View Related
Help With XML Slideshow - Fading Last Image
Hi I'm working on and xml loaded slideshow. I have a script that I got off of this site where the image fades out before the next one is loaded. The only problem is that the last image does not fade out, it just goes back to the first image which makes it inconsistant.
Anyone think they could help me with this?
Thanks in advance!
Here is the code I have so far:
Code:
delay = 4000;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
link = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
link[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
firstImage();
} else {
content = "Please refresh your browser. XML was not loaded correctly";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
p = 0;
function preload(clip) {
picture.loadMovie(clip);
var temp = this.createEmptyMovieClip("temp", 9987);
temp.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
if (filesize>4 && filesize == loaded) {
picture._alpha += 1;
// used to be 10
if (picture._alpha>100) {
picture._alpha = 100;
slideshow();
delete this.onEnterFrame;
}
}
};
}
function nextImage() {
if (p<(total-1)) {
p++;
fadeOut(image[p]);
desc_txt.text = description[p];
desc_txt2.text = link[p];
}
}
function firstImage() {
picture._alpha = 0;
fadeOut(image[0]);
desc_txt.text = description[0];
desc_txt2.text = link[0];
}
function slideshow() {
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow() {
clearInterval(myInterval);
if (p == (total-1)) {
p = 0;
firstImage();
} else {
nextImage();
}
}
}
function fadeOut(clip) {
picture.onEnterFrame = function() {
this._alpha -= 1;
if (this._alpha<1) {
preload(clip);
delete this.onEnterFrame;
}
};
}
View Replies !
View Related
Help Fading Image Into Frame
Ok, well let me just start by saying that I am extremely new to flash and these forums. I am a "webdesigner" (meanign that I made my own site and a friends so im not like a proffesional at that either). I found these forums and thought that they would be able to help me find what I'm looking for.
My objective: To take my logo and have it fade into the frame. So like the page woudl just be dark grey, and then seemingly out of nowhere the logo would fade in. I know this doesnt seem like that hard of a task, but for me it is impossible, I tried following a tutorial and got stuck when it said "Create a new movie file" (to give you guys an idea on how new I am).
I would appreciate any help anyone could give me.
PS. Are there any books that are particularly good for teaching beginner flash that will teach me what I need to know to be able to integrade flash decently with my sites? I looked at "Flash 8 For dummies" lol and thought it might help, just want to ask you guys though.
Thanks alot.
View Replies !
View Related
Animated Image Fading
Yo Yo Again,
Don't mean to be a bothering pest or w/e but does anyone know how to make animated buttons that fade images in when you put your mouse over them. So when someone hovers over a button, the image fades in and when their mouse moves off the button, the image fades out.
Thanks dudes
View Replies !
View Related
Image Fading Problem
The flash file I have attached below works fine except for one problem and if anyone can help I'd really appreciate it.
The problem is when I select a second image from the thumbnails the main image should fade away before the new one fades in, but instead the old one just vanishes instantly.
I can't see why this is as the loadOut function should work for the main image in the same way as it works for the thumbnails remaining to be loaded text.
I've been trying to sort this out for ages, its driving me mad!
View Replies !
View Related
Problem Image Fading AS
I have a problem with a little excercise I'm making. It looks a lot like that of the Flash MX samples: load_images. The problem is that I've set an IF condition, all conditions for that IF are fullfilled BUT he won't go IN that IF condition, I don't get it. It is the first IF of onEnterFrame.
SWF file
FLA file
View Replies !
View Related
Loaded Image Not Fading Up, Going Mad
Hi
This is really doing my head in as i have used the same proccess successfully before. This is the bit thats really annoying me. Loading in images from xml and using a listner to fade up to 100 alpha (using mctwee2 thingy) when loaded, but its not playing ball.
Code:
#include "mc_tween2.as"
///////////////////////////
//set vars
var pink:String = "0xEC0B8D";
var grey:String = "0x7E8082";
var picNum:Number = -1;
var nextNum:Number = -1;
//////////////////////////////////////////////
////load sections function
var imageLoader:MovieClipLoader = new MovieClipLoader();
var imageListener:Object = new Object();
imageLoader.addListener(imageListener);
imageListener.onLoadInit = function():Void {
trace("second = "+imagesMC["picMC"+nextNum]);
//this is what isnt working
imagesMC["picMC"+nextNum].tween("_alpha", 100, 0.5, "linear");
}
function loadPic(){
nextNum = imagesMC.getNextHighestDepth();
imagesMC.attachMovie("pic", "picMC"+nextNum, imagesMC.getNextHighestDepth(), {_y:0, _x:0, _alpha:50});
imageLoader.loadClip(galleryArray[picNum], imagesMC["picMC"+nextNum]);
}
//////////////////////////////
//generate buttons from xml
function generate(){
//trace("generate");
var targX:Number = 0;
for(i=0,j=1;i<xmlLength;i++,j++){
//add button clip from library
_root.attachMovie("galleryBut", "galleryBut"+i, _root.getNextHighestDepth(), {_y:230, _x:targX, _alpha:100});
//set number for button, if less than 10 add 0
if(j < 10){
_root["galleryBut"+i].numText.htmlText = "<b>0"+j+"</b>";
} else {
_root["galleryBut"+i].numText.htmlText = "<b>"+j+"</b>";
}
//set new x pos for next itteration
targX += 18.8;
//set button actions
var newBut:MovieClip = _root["galleryBut"+i];
newBut.num = i;
newBut.onRelease = function(){
if(this.num != picNum){
picNum = this.num;
loadPic();
changeButColor();
}
}
newBut.onRollOver = function(){
this.solidMC.colorTo(pink, 0.3, "linear");
}
newBut.onRollOut = function(){
if(this.num != picNum){
this.solidMC.colorTo(grey, 0.3, "linear");
}
}
}
}
//set all buttons apart from currently selected back to grey
function changeButColor(){
for(i=0;i<xmlLength;i++){
if(i != picNum){
_root["galleryBut"+i].solidMC.colorTo(grey, 0.3, "linear");
}
}
}
//////////////////////////////////////////////
//////////////////////////////////////////////
////load xml and populate arrays
var xmlData:XML = new XML();
xmlData.ignoreWhite = true;
var profileArray:Array = new Array;
var imageArray:Array = new Array;
var nameArray:Array = new Array;
var tagArray:Array = new Array;
var galleryArray:Array = new Array;
var xmlLength:Number;
xmlData.onLoad = function(){
xmlLength = this.childNodes[0].childNodes.length;
for(i=0;i<xmlLength;i++){
profileArray.push(this.childNodes[0].childNodes[i].attributes.profile);
imageArray.push(this.childNodes[0].childNodes[i].attributes.profileImage);
nameArray.push(this.childNodes[0].childNodes[i].attributes.profileName);
tagArray.push(this.childNodes[0].childNodes[i].attributes.profileTags);
galleryArray.push(this.childNodes[0].childNodes[i].attributes.galleryImage);
}
generate();
}
xmlData.sendAndLoad("http://www.rsvplondon.co.uk/beta/includes/gallery-spotlight.xml.php", xmlData, "POST");
stop();
http://www.raw-nerve.co.uk/outgoing/rsvp/gallery_spotlight.zip
probably something very simple but im either stupido or blind.
Thanks in advance
View Replies !
View Related
Image Swapping And Fading Out
HI
I am trying to create a 'fade in' 'fade out' of images or swapping over effect for an advertisement on a website.
I would be using Flash MX 2004 to do this.
Basically I am trying to start with the 'rabbitad2.jpg then the text on the ad to slowly fade in one line at a time, then the image would then fade out and another image would take it's place with another slogan.
A bit like this example here :
http://www.friday.com.au/index.php?pageId=search-engine-ppc
Any help at all would be appreciated.
Thank you
MDS
View Replies !
View Related
Fading Image Onto Another, And Then Fade Back
Hi. I'm stumbling over this one. Using flash MX, I want to have a client logo fade out(on rollover)to reveal "underneath" client comments (in a graphic) which will last, say, 150 frames, and then fade out, and the button'logo fades in again.
I've tried two layers, tweening, but I'm not getting it right.
Is there a simple way I'm missing?
Thanks, Summer
View Replies !
View Related
Fading Image Slide Show
I want to create a flash slide show were I can define the time between pictures as well as have the pictures fade in and out.
Can anyone point me to a sample that I can pick apart. Or perhaps
there's an easy way to do this in flash MX 2004 that some one can tell
me about.
Thanks
View Replies !
View Related
Image Viewer Fading Problem
Hi,
I have created a horizontal scrolling image viewer, but have encountered a problem. I want the images to fade out when they leave the red square, and fade in when the enter the red square (see attached file).
I have tried numerous methods but can't find one that works using both scroll methods (mousewheel and scroll bar).
Please help me.
Code:
var DIV:Number = 3;
var IMAGE_WIDTH:Number = 68;
var NUM_IMAGES:Number = 6;
var MARGIN_WIDTH:Number = 10;
var NUM_VISIBLE_IMAGES:Number = 2;
var endX:Number;
var endY:Number;
var scrolling:Boolean;
var dirRef:Number;
var scrollRef:Number = imageHolderMC._x;
var scrollDiv:Number = (scrollBarMC._width-scrollBarMC.scrollerMC._width)/(NUM_IMAGES-NUM_VISIBLE_IMAGES);
var lastX:Number = scrollRef;
var mouseListener:Object = new Object();
updateScrollPos = function ():Void {
//Get the zero based index of the scroll bar dragger
var pos:Number = scrollBarMC.scrollerMC._x+(scrollBarMC._width-scrollBarMC.scrollerMC._width)/2;
//Move the scroll bar dragger to the correct position
scrollBarMC.scrollerMC._x = scrollDiv*Math.round(pos/scrollDiv)-(scrollBarMC._width-scrollBarMC.scrollerMC._width)/2;
//Calculate the scroll multiplier
scrollMultiplier = Math.round((dirRef-scrollBarMC.scrollerMC._x)/scrollDiv);
//Move the images
endX = lastX+(IMAGE_WIDTH+MARGIN_WIDTH)*scrollMultiplier;
lastX = endX;
};
scrollImages = function ():Void {
//Get the 0 zero based index of the scroll bar dragger
var pos:Number = scrollBarMC.scrollerMC._x+(scrollBarMC._width-scrollBarMC.scrollerMC._width)/2;
var totalScrollAmount:Number = (NUM_IMAGES-NUM_VISIBLE_IMAGES)*IMAGE_WIDTH+(NUM_IMAGES-NUM_VISIBLE_IMAGES)*MARGIN_WIDTH;
var scrollPos:Number = pos*totalScrollAmount/(scrollBarMC._width-scrollBarMC.scrollerMC._width);
imageHolderMC._x = scrollRef-scrollPos;
};
scrollBarMC.scrollerMC.scrollerBtn.onPress = function() {
//Set this variable to determine the scrolling direction
dirRef = this._parent._x;
this._parent.startDrag(false, -this._parent._parent._width/2+this._parent._width/2, 0, this._parent._parent._width/2-this._parent._width/2, 0);
mouseListener.onMouseMove = function() {
scrolling = true;
scrollImages();
};
};
scrollBarMC.scrollerMC.scrollerBtn.onRelease = function() {
scrolling = false;
this._parent.stopDrag();
delete mouseListener.onMouseMove;
updateScrollPos();
};
scrollBarMC.scrollerMC.scrollerBtn.onReleaseOutside = function() {
scrolling = false;
this._parent.stopDrag();
delete mouseListener.onMouseMove;
updateScrollPos();
};
mouseListener.onMouseWheel = function(delta) {
var pos:Number = scrollBarMC.scrollerMC._x;
var maxPos:Number = scrollBarMC._width/2-scrollBarMC.scrollerMC._width/2;
var minPos:Number = maxPos*-1;
var div:Number = delta<0 ? scrollDiv : scrollDiv*-1;
if (pos+div<minPos || pos+div>maxPos) {
return;
}
scrollBarMC.scrollerMC._x += div;
if (delta<0) {
//Scroll images left
endX = lastX-IMAGE_WIDTH-MARGIN_WIDTH;
} else {
//Scroll images right
endX = lastX+IMAGE_WIDTH+MARGIN_WIDTH;
}
lastX = endX;
};
fadeInImage = function (imageIndex:Number):Void {
imageHolderMC["imageMC"+imageIndex].onEnterFrame = function() {
this._alpha += 10;
if (this._alpha>100) {
delete this.onEnterFrame;
}
};
};
fadeOutImage = function (imageIndex:Number):Void {
imageHolderMC["imageMC"+imageIndex].onEnterFrame = function() {
this._alpha -= 10;
if (this._alpha<0) {
delete this.onEnterFrame;
}
};
};
imageHolderMC.onEnterFrame = function():Void {
if (!scrolling) {
//easing
this._x += (endX-this._x)/DIV;
}
};
Mouse.addListener(mouseListener);
View Replies !
View Related
Image Viewer Fading Problem
Hi,
I have created a horizontal scrolling image viewer, but have encountered a problem. I want the images to fade out when they leave the red square, and fade in when the enter the red square (see attached file).
I have tried numerous methods but can't find one that works using both scroll methods (mousewheel and scroll bar).
Code:
var DIV:Number = 3;
var IMAGE_WIDTH:Number = 68;
var NUM_IMAGES:Number = 6;
var MARGIN_WIDTH:Number = 10;
var NUM_VISIBLE_IMAGES:Number = 2;
var endX:Number;
var endY:Number;
var scrolling:Boolean;
var dirRef:Number;
var scrollRef:Number = imageHolderMC._x;
var scrollDiv:Number = (scrollBarMC._width-scrollBarMC.scrollerMC._width)/(NUM_IMAGES-NUM_VISIBLE_IMAGES);
var lastX:Number = scrollRef;
var mouseListener:Object = new Object();
updateScrollPos = function ():Void {
//Get the zero based index of the scroll bar dragger
var pos:Number = scrollBarMC.scrollerMC._x+(scrollBarMC._width-scrollBarMC.scrollerMC._width)/2;
//Move the scroll bar dragger to the correct position
scrollBarMC.scrollerMC._x = scrollDiv*Math.round(pos/scrollDiv)-(scrollBarMC._width-scrollBarMC.scrollerMC._width)/2;
//Calculate the scroll multiplier
scrollMultiplier = Math.round((dirRef-scrollBarMC.scrollerMC._x)/scrollDiv);
//Move the images
endX = lastX+(IMAGE_WIDTH+MARGIN_WIDTH)*scrollMultiplier;
lastX = endX;
};
scrollImages = function ():Void {
//Get the 0 zero based index of the scroll bar dragger
var pos:Number = scrollBarMC.scrollerMC._x+(scrollBarMC._width-scrollBarMC.scrollerMC._width)/2;
var totalScrollAmount:Number = (NUM_IMAGES-NUM_VISIBLE_IMAGES)*IMAGE_WIDTH+(NUM_IMAGES-NUM_VISIBLE_IMAGES)*MARGIN_WIDTH;
var scrollPos:Number = pos*totalScrollAmount/(scrollBarMC._width-scrollBarMC.scrollerMC._width);
imageHolderMC._x = scrollRef-scrollPos;
};
scrollBarMC.scrollerMC.scrollerBtn.onPress = function() {
//Set this variable to determine the scrolling direction
dirRef = this._parent._x;
this._parent.startDrag(false, -this._parent._parent._width/2+this._parent._width/2, 0, this._parent._parent._width/2-this._parent._width/2, 0);
mouseListener.onMouseMove = function() {
scrolling = true;
scrollImages();
};
};
scrollBarMC.scrollerMC.scrollerBtn.onRelease = function() {
scrolling = false;
this._parent.stopDrag();
delete mouseListener.onMouseMove;
updateScrollPos();
};
scrollBarMC.scrollerMC.scrollerBtn.onReleaseOutside = function() {
scrolling = false;
this._parent.stopDrag();
delete mouseListener.onMouseMove;
updateScrollPos();
};
mouseListener.onMouseWheel = function(delta) {
var pos:Number = scrollBarMC.scrollerMC._x;
var maxPos:Number = scrollBarMC._width/2-scrollBarMC.scrollerMC._width/2;
var minPos:Number = maxPos*-1;
var div:Number = delta<0 ? scrollDiv : scrollDiv*-1;
if (pos+div<minPos || pos+div>maxPos) {
return;
}
scrollBarMC.scrollerMC._x += div;
if (delta<0) {
//Scroll images left
endX = lastX-IMAGE_WIDTH-MARGIN_WIDTH;
} else {
//Scroll images right
endX = lastX+IMAGE_WIDTH+MARGIN_WIDTH;
}
lastX = endX;
};
fadeInImage = function (imageIndex:Number):Void {
imageHolderMC["imageMC"+imageIndex].onEnterFrame = function() {
this._alpha += 10;
if (this._alpha>100) {
delete this.onEnterFrame;
}
};
};
fadeOutImage = function (imageIndex:Number):Void {
imageHolderMC["imageMC"+imageIndex].onEnterFrame = function() {
this._alpha -= 10;
if (this._alpha<0) {
delete this.onEnterFrame;
}
};
};
imageHolderMC.onEnterFrame = function():Void {
if (!scrolling) {
//easing
this._x += (endX-this._x)/DIV;
}
};
Mouse.addListener(mouseListener);
View Replies !
View Related
Fading Out Then Load New Image Then Fade In?
This is the setup..
I call the onPress event on a image that fades out whatever image is in the loader componet then, I want load a new image and fade back in but, i can only get one or the other to work. I'm trying to fade in and out using onEnterFrame event but, it's giving me weird results... here is the code
var flag:boolean = true;
mainLoader.onEnterFrame = function(){
flag = this._alpha -= 10 : this._alpha += 10;
if(this._alpha <= 0){
flag = false;
mainLoader.contentPath = "this.jpg";
} else if(!flag && this.alpha >= 100){
delete this.onEnterFrame;
}
}
View Replies !
View Related
Fading Grid To Unload Image
I managed to get Voetsjoeba's fading grid working now I want to do the opposite. at the moment I can see how to fade an image in from left top to right bottom and see how I can fade the image in right bottom to left top but cant fade the image out right bottom to left top. Hope that isn't too confusing. I need sleep.
View Replies !
View Related
Image Fading In And Out From External Directory
Hi everyone, and thank you for reading my tread.
I am trying to create a canvas which will display 5 images ( one in each corner and one in the middle) now the trick is that the loader should be able to load any jpgs uploaded into that directory and display them in a random order in one of the 5 spots, and also the images should fade in and out.
Any help is greatly appricated..
View Replies !
View Related
Image Fading In And Out From External Directory
Hi everyone, and thank you for reading my tread.
I am trying to create a canvas which will display 5 images ( one in each corner and one in the middle) now the trick is that the loader should be able to load any jpgs uploaded into that directory and display them in a random order in one of the 5 spots, and also the images should fade in and out.
Any help is greatly appricated..
View Replies !
View Related
|