On mouse over alpha fade?

I am trying to create a presentation that has small photos scrolling across the screen. On user click the alpha changes from say 20 to 100. When the user drags off the alpha returns to 20 and continues sliding along. Does that make any sense??? If you have any ideas please post, I am really stuck. I believe an alpha fade on mouse over can be done…hopefully :frowning:

Thanks,
Dustin

Something that is similar to what I’m trying to do…Gucci Website

go to gucci now on the menu and then ad campaign

There have been a few posts about _alpha recently. Try and find them with the search, they’re quite recent. Post back if you have problems.

pom :asian:

I am not a pro, but this might work… Maybe one of the pros can add to what I have to say and teach us both : )

I would create a symbol(movie) and create the tween from say 20% to 80% alpha. label the frames and piont a “telltarget” or “with” command at the embedded movie that you just made. then create the tween out and label those frames too.

for example:
on rollover; telltarget “name of movie symbol”, go to and play “name of fade in label”

on rollout; telltarget “name of movie symbol”, go to and play “name of fade out label”

I hope this makes sense

J. Rosano

Hmm, actually tellTarget has been deprecated (fazed out) as of Flash MX. It is now replaced with

_root.youMC.gotoAndPlay(frame#)

Here is a link to a thread where I believe does the effect you wanted…

http://www.kirupaforum.com/showthread.php?s=&threadid=5669&highlight=alpha+button

Ok, create an Movie Clip and set the instance name of it to myMovieClip. then under that movie clip put this code…


onClipEvent(load){
	alphaChange=10;
}
onClipEvent(enterFrame){
	this._alpha-=alphaChange;
	if((this._alpha <= 0) or (this._alpha>=100)){
		alphaChange*=-1;
	}
}

hrmmm that should fade out and then fade back in…hope i havn’t confused you more… :slight_smile:

oh and if u want it to do that when u rollover something you would have to do something like that but just make it so alphaChanger = 10 when you rollOver…and -10 when ur not rolled over…hrmm that should work…

Thanks so much guys… I got a hold of lostinbeta on aim and he explained everything for me. I had one more question for you lost if you get this. Here is my code for my pics that fade in and out on rollover, but I was wondering if you ever figured out how to do on release load movie? I tryed entering it in myself but I keep getting errors. Probably because I’m putting it between two functions. Anyhow if you dont reply to this its coo, I’ll try and catch you on aim sometime. Thanks everyone!

onClipEvent (load) {
this._alpha = 30;
//set original alpha
}
onClipEvent (enterFrame) {
function fadeOut() {
if (this._alpha>30) {
this._alpha -= 10;
} else {
this.onEnterFrame = null;
}
}
// this function increases the _alpha of the object calling it
// when it reaches 100, it deletes its enterFrame
function fadeIn() {
if (this._alpha<100) {
this._alpha += 10;
} else {
this.onEnterFrame = null;
}
}
this.onRollOver = function() {
// when you roll over the button, you define its enterFrame as the
// function you have just declared. You could hard code it, but it is
// clearer that way and more reusable
this.onEnterFrame = fadeIn;
};
this.onRollOut = function() {
this.onEnterFrame = fadeOut;
};
}

Where in this would I enter my on release function to load movie?

Hey bullseye, sorry I haven’t gotten a chance to get back to you.

I found out a way to do what you want to do, but now I can’t seem to find the file so I can impliment it into your movie.

Can you possibly resend me the file so I can get back in the state of mind that I was when I first started fixing it.

<B>EDIT: </B> Nevermind, I found the test file that I sent you, I will just go off of that.

Ok, here we go, I had to rush it, but I think its good. I added a few notes.

Hopefully you understand it. If not you can always post here or see me on AIM.

<B>EDIT:</B> I seemed to have left out one major detail…that is how I got the pictures to show.

Open you your library (CTRL+L) and open up the folder that says “Bigger”, right click on each of the pictures and choose “Linkage…”. Notice how I checked the “Export for Actionscript” checkbox. The look at what I have under the name.

Now go into your movieclip/button things actions and notice on the this.onRelease action where I include the attachMovie() function, the names I used match those in the Linkage area of each of the bigger clips.

Awesome! thanks so much lost. I have one more question for you. I am try to but about 10 pictures total(maybe more) that will be my fade in buttons to click. The problem I am having is when I try and create those movie clips the go off the screen and I can see what is what. Is there a way to extend the working surface. I tryed to go to the max width (2880 pixels) but that wasnt enough still. any ideas?

What I did was created the buttons in a row. I am sure you can fit all 20 of them in the screen. Have the actions all set for what you want them to do. Select all of the movie clips and right click and copy them.

After you do this, right click on the canvas and choose “Paste”, then with all of them selected, drag them to where you want.

Either this or you can just create 2 rows of 10 images (which in actuality will be 2 rows of 20 since you have to double them).

ok cool I will try that…Another question I had is can I put the clear image button inside the bigger movie clip? So it only comes up when the bigger clip comes up? The bigger movie clips will fade in on top of the smaller clips. Hope that makes sense

It does make sense and yes you most certainly can. Just copy and paste it into each of the movie clips. Keep the actions in tact, and you should have no problem at all.

AWESOME!!!

I hope it works out for you. You know I want to see the final product when it’s done right:P

One more question for you lost…I want to have the “biggerbox” movie clips to load as swf’s from a seperate directory so they will preload. Some of the images that are going to be loading in those movieclips are rather large and may require a preload.
For instance instead of this…

    _root.loadTo.attachMovie("box1bigger", "box1bigger", 1000);

Have this?

    _root.loadTo.attachMovie("box1bigger.swf", "box1bigger.swf", 1000);

Unless there is a better way to implement the preloader into the biggerbox movie clips? oh yeah and what is the 1000 value for?

No, that would require loadMovie()

Your images will preload if you put a preloader on your main movie. I believe preloaders also load the movies library, I could be wrong though.

Doesnt it kind of make no sense to load movies that user might not click. I was just thinking of making it as “modem” friendly as possible. That way each specific larger picture has a preloader, that way its small amounts of time broken up as opposed to one large preload. Would it be difficult to sub the loadto for loadmovie?

hmmm I got the file to work perfect as how I want images to load and such. As soon as a I put the movie that works into my main interface to load it doesnt work. So basically I created the fadeanimation.swf. It loads in my interface movie, but doesnt allow me to click things. Is a library not available for loadto when you have the file load movie in another file? WOW that was confusing. I hope you understand what I’m talking about.

I’ve got class from 5 to 6 and a meeting from 6:15 to 8 or so. I’ll reply tonight when I get back. Thanks so much for your help lost. I’d be lost if you werent here :slight_smile:

Ok, with a loadMovie command for each image you are going to have 20 .swf files. If you can deal with that then go for it! This should also work with your problem with loading your movie.

The next option is to use Shared Libraries to share the libraries between your loaded movie and the movie you are loading into. I think this will fix your problem since the pictures are taken directly from the library.

http://www.macromedia.com/support/flash/ts/documents/shared_libraries.htm

There is where you can read up on Shared Libraries. As for using load movie, I think you already know how to do that since you already did it to load the navigation anyway.