# On mouse over alpha fade?

**URL:** <https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534>\
**Category:** Uncategorized\
**Created:** [September 14, 2002, 8:50am UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534 "2002-09-14T08:50:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bullseye](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@Bullseye](https://forum.kirupa.com/u/Bullseye)\
**Post date:** [September 14, 2002, 8:50am UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/1 "2002-09-14T08:50:22Z")

</div>

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 ☹

Thanks,  
Dustin

Something that is similar to what I’m trying to do…[Gucci Website](http://www.gucci.com)

go to gucci now on the menu and then ad campaign

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2002, 11:08am UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/2 "2002-09-14T11:08:30Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2002, 9:19pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/3 "2002-09-14T21:19:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2002, 9:48pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/4 "2002-09-14T21:48:00Z")

</div>

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](http://www.kirupaforum.com/showthread.php?s=&threadid=5669&highlight=alpha+button)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 15, 2002, 7:27am UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/5 "2002-09-15T07:27:24Z")

</div>

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

```auto

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… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 15, 2002, 7:30am UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/6 "2002-09-15T07:30:13Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 7:38pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/7 "2002-09-18T19:38:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 7:56pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/8 "2002-09-18T19:56:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 8:34pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/9 "2002-09-18T20:34:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 9:40pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/10 "2002-09-18T21:40:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 9:43pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/11 "2002-09-18T21:43:07Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 9:50pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/12 "2002-09-18T21:50:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 9:55pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/13 "2002-09-18T21:55:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 9:56pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/14 "2002-09-18T21:56:27Z")

</div>

AWESOME!!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 10:01pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/15 "2002-09-18T22:01:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 10:23pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/16 "2002-09-18T22:23:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 10:39pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/17 "2002-09-18T22:39:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 10:46pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/18 "2002-09-18T22:46:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 18, 2002, 11:15pm UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/19 "2002-09-18T23:15:25Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 19, 2002, 12:04am UTC](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534/20 "2002-09-19T00:04:19Z")

</div>

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](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.

[Next page](https://forum.kirupa.com/t/on-mouse-over-alpha-fade/5534.md?page=2)
