multi-layer alpha tween...

I think this may be a silly question but I'm stuck.

basically, I want to do a fade out/in slideshow tween a couple fotos.

I assume I just need the one layer to fade out as another layer is fading in, eh?   maybe it's one of those things where it's too simple.   anyway, the procedure to drop a foto on the stage and turn it into a movie, etc, etc, I want to make sure I'm going in the right direction.    sorry, one hat too many.   :P

I probably need one of these tweening wizards but I haven't found one that makes it any easier.   any suggestions?
well, it's either got to manage everything well via some GUI >OR< use simple coding methods that can be understood, modified and maintained.  
zenLogicAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blue-genieCommented:
have a look at your frame transitions  ( assuming you're using mx 2004) - all done for you.
BillystyxCommented:
and if blu's suggestion is not what you looking for (but it should be - so easy - :), here is a code alternative at
www.billystyx.co.uk ->downloads->flash flas->page 5->image fade in fade out effect (first one).

good luck

billystyx
marger50Commented:
I'm thinking that the frame transitions are only available for MX 2004 Professional. If you don't have that, you can fade in and fade out by turning your photos into symbols and then setting the alpha to turn on the transparency.

1. Place the first photo on the stage in let's say frame 1 (this is already a keyframe).
2. Convert it to a graphics symbol (F8).
3. Create a keyframe in frame 20 (F6) of the same layer.
4. Select the photo symbol on the stage here in frame 20, and set the Alpha to 0% in your Properties (listed in the Color menu).
5. Go back to frame 1 and set up a Motion Tween. This will fade the first photo as you go from frame 1 to frame 20.
6. Create a blank keyframe (same layer) in frame 21 (F7).
7. Place your second photo on the stage in the same position that the first one was.
8. Convert this to a graphics symbol also.
9. Create keyframes (F6) in frame 40 and frame 60.
10. In frame 21, set the alpha for your photo to 0% (so it will start out transparent)
11. In frame 40, set the alpha for your photo to 100% (so it will be completely visible).
12. In frame 60, set the alpha for your photo to 0% again (so it will fade out again).
13. Create motion tweens between all keyframes.

This will make the first photo fade out, the second photo fade in, and then the second photo fade out. If you want the photos to stay on the stage completely visible for a bit, just add some non-tweening frames in there between the fade in and fade out process. And obviously, you can decide how long you want each fade to take by changing the number of frames between keyframes (My example put 20 frames between each).

Hope this helps.

Marge

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

zenLogicAuthor Commented:

I'm using MX 2004 but am more familiar with plain MX.   where is this frame transition stuff?

sorry guys I'm more of a database type and this shit kinda boggles me.    need help with a complex MS/SQL view gimme a call.

anyway, I think I'm starting to get it tho'.
how about if I want foto #1 to fade out and foto #2 fading in starting half way thru #1's fade out?
basically, I want to fade in/out between both fotos and, of course, never have either an empty stage or just a solid foto.

soooo, I think if I have the first foto fading out from 1-20 and foto #2 fading in from 10-30 it should work, right?
BillystyxCommented:
Yes, as blu pointed out, there is no transitions in 6.

You will have to go with either my method using action script, or Marge's (probably best if you aren't comfortable with action script).

Marge's option should work fine for you, the only down side is it makes the file larger.

cheers, and good luck

billystyx
zenLogicAuthor Commented:

what is it with the alpha setting?
can't u change it after the motion tween has been inserted into the layer?
isn't it as simple as changing the starting alpha to 100 or 0 as u indicate here?
BillystyxCommented:
If you click on frame1 of the tween, you can adjust one end of the the alpha and then on the frame on the other end of the tween, click on that and you should be able to change the alpha setting there. Then the tween should reflect your changes.
You can only tween and change alpha on a movie clip.

zenLogicAuthor Commented:

I've tried that over and over and when I change the alpha setting in frame1 to zero and then go to frame20 and set it to 100 it don't take!   r u sure ya don't havta re-do the whole alpha tweening to make it work?
BillystyxCommented:
What does it do when you try this, specifically?

zenLogicAuthor Commented:

when I click in the first frame and change the alpha value and then go to the last and change it the values don't stay attached to the frames.   the original fade OUT tween is STILL in effect!!
BillystyxCommented:
Well, you can always start again...
To be honest, I usually use action script for tweening, due to the fact it s more friendly on file size. I am sure it is possible this way - but its been a while since I played with timeline tweening:)

add the two mcs to the stage in the same position, give them 2 separate instance names, and then add this code to the frame.
mc1._alpha=0;
mc2._alpha=100;
mc1.onEnterFrame=function(){
mc1._alpha +=5;
}
mc2.onEnterFrame=function(){
mc2._alpha -=5;
}

this will tween one in and one out at the same time - and no messing around with the timeline.

make sure of course that your instance names reflect those in this code, or the code instance names r3eflect those name you gave the clips.

billystyx
zenLogicAuthor Commented:

yeah, I've been avoiding AS but this looks a lot simple than the phreakn timeline.    I'm in the awkward position of being more of a VB/ASP programmer.    this C syntax with the hypercritical "{}" encapsulations are annoying.   ya ever notice how not many people want to scream from the hilltops "I AM A GREAT COMPUTER PROGRAMMER!"?    I been in the biz almost 30 years and burnt a good chunk of brain on the mainframe era.

there's always this trick with GUIs - they have to either be near perfect to give clear procedures for EVERYTHING imaginable or ya end up needing code anyway.   THAT'S what so stupid about Flash!   I just got it.   usually u use a GUI and it generates code but Flash does what?   it must just hide some generated script somewhere for what it does on the stage, eh?
BillystyxCommented:
not sure how it works to be honest:)
But, I do think that it works differently, otherwise the compiled swf would be no different in size one way or the other, and it isn't the case.
If you are doing if else statements, and you only have one statement you don't need the {} but it pays to get into the habit anyway.

I use vba too, and I find it clunky in a lot of ways action script/javascript isn't, but I do like the goto Here
bit in subs to skip code.
You have the equivalent of break; in AS, but only in for or while loops.

Every coding language has its pros and cons I guess  - just what you're used to..
Anyway, in the newest version of flash, as blu pointed out, transitions will do all this for you with built in classes, but before that version you are better of using your own AS.

Did it work then?
If so, good luck.

billystyx

marger50Commented:
Is it possible that you didn't set keyframes at each end of the tween? The keyframe is necessary if you want something to change from frame 1 to frame 20 (like the alpha setting).

If you want to make one fade in while the other fades out, you could put them on two different layers. And then stagger the tweens, so as one is fading out, the other is fading in.

Marge
zenLogicAuthor Commented:

another "hat" too far...
I don't know about u guys but having to do the one person IT dept gets a bit old after a while.
I should either figure out these transition classes in MX 2004 or get into AS.

I'm gonna try the coding approach first later today...
I'll let ya know.

thanks for the help,
Jon
BillystyxCommented:
no worries. good luck:)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.