Link to home
Start Free TrialLog in
Avatar of marglar
marglar

asked on

simple fade to white transition between images (rotating slide show)

geeeeze, you'd think I'd know this by now...

I have a simple flash header that I'm building.  The right 1/3 of the header is a place for images to cycle one after the other.  What I want is for the images to fade to white and then have the next one fade in.

However, I have a number of images and I'm wondering if there is an faster way than adding a transition effect for the in and out of every single image.  

I'd love to find a simple, fast way to do this transition without all the hassle of the built in transitions...

Any ideas?
Avatar of Zeffer
Zeffer
Flag of New Zealand image

Avatar of marglar
marglar

ASKER

Thanks, but I'm working with images in the library not external images.

Is there an easy way to do this with images from the library?  I even thought about creating a white box that fades in and then out again and placing it in the timeline over the place where one image ends and the next one begins.  It works OK but I wonder if there is a better, simpler, cleaner way...

Any help is most appreciated!



Not a simple way no..you could do it by putting each image in a movieclip..do the fade up and fade down and then attach each one with attachMovie..but that is probably more work than you are doing at the moment.
Why not use external images?..if you don't want the "loading image" thing you could preload them just by sticking them outside the stage somewhere of the main movie on frame 1..the loading time would be identical to having them embedded and they would all appear seamlessly.

Z
creating a white box that sits over the top sounds fine - that would work a treat. then you use a bit of actionscript to change the _alpha property of that box. You could use a setInterval() function to control the fading effect. (remembering to keep hold of the setInterval() value so that you can clear it each time)

that's probably how i'd do it.
Avatar of marglar

ASKER

I like the idea of using action script to control the alpha of the box.  I have to admin though that I'm a complete noobie when it comes to action script.

Could you help me out with what that code would look like?  I'm not a programmer at all but this sounds like the perfect solution!
ASKER CERTIFIED SOLUTION
Avatar of najh
najh
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of marglar

ASKER

what about something using the tween class to change the alpha?  Wouldn't that be easier?
I don't know how you'd do that. I only suggested this method because I know it works. I've never used the tween class, but if you've got a method which works better using it then go for it.
Avatar of marglar

ASKER

Thats cool.

Could you show me how I could use this on the timeline to slowly fade my box to 0 alpha and then on the timeline how to slowly fade it to 100% alpha?

This looks like just what I need, I just don't need it to work on mouse-over but rather as a timeline event.

Thanks so much for all of the great help!
I've put a copy of a flash file here:
http://www.geocities.com/neilonusenet/

it's the second item. I've actually faded to red just to make it a bit more easy to see - it fades from red to clear after about 1 second and then fades back to red again. There are a few setIntervals being used in there, but that's ok so long as they're always cleared.

You'll be able to see that you can actually trigger any transition you like from this sort of code - setInterval is really very useful and worth understanding.
Avatar of marglar

ASKER

Hey!  Thats really cool.  Thank you!

Sorry to be a bit dense.  I'm still trying to understand..  I'd show one instance of text and imagery for however long I want it, then add that action script to the timeline to do a fade in of my graphic and a fade out again, revealing my next image.  Is that right?

This example is actually reverse from what I need, I think.  I need to go from normally transparent to temporarily opaque and then back to transparent again.  Then I need it to stay transparent until I'm ready to do the whole thing over again.   What changes would I need to make to have it work in that way?

Thanks so much for your help!
Ah I'm at home and don't have the code to hand - but basically the bit that calls the makeTransparent function can be swapped with the makeOpaque function and then it'll do it the other way around.

As for triggering it to do it over again, you need to decide what's going to trigger it, and have it all called by another function.