Actionscript to fade in/fade out picture depending on frame?
I've searched the board but I can't figure out the answer to my question. I just want to fade in/out a movieclip. I can do this with tweens, but I'm really interested in how this would be done with actionscript.
How could I make it so that the fade in occurs with frames 1-15, stops, and then starting with 16 fades out?
I do have some code that will import a picture into a movieclip and fade it in, but I'm not sure how to alter the code so that the pic fades out on frame 16. The code below is fairly detailed... I would not mind a basic solution!!
then you need to run a check on whatever mc or the main stage has the frames 1-16. when you run the check just ask if ("whatever"._currentframe==16) { fadePicOut(); }
Well, the fadeout doesn't work... I'll post the .fla? I have a stop action on frame 15 because the rest of my content stops on frame 15. I have an outside button in another file that when pressed, the timeline will play frame 16-30.
Well, the picture now fades in and fades out, but what I needed was for the picture to fade in from frame 1-15, stop, and then on frame 16 on fade out.
On frame 15, I have a stop action because I have an outside button that when click should play frames 16 on as an exit transition. So, I need the picture to fade out from 16 on...
you will have to loose the idea of frames. this is actionscript . you can change the timing by changing the 'fade rate' and make your button mc show only when your picture has finished fading in. like so:
I'll show you more of my files so you can see how it works... the main_test.swf will show you how the transitions are working and content1.fla is what we are working on right now. Click on one of the item buttons to see how the transitions are working...To keep the frame idea, can I use different code? OR, do I have to resort to using tweens for this?
Last edited by sirenetta1; 09-21-2005 at 09:05 PM.