-
[F8] menu fade in, fade out... the easy way????
Hi people.
Im trying to make a menu that when u click a button the content fades on.
Now when u click another button i want the content to fade out and the new stuff in.
I can do this but i think im doing it the stupidly long way by jumping around the timeline to where i've made each and every animation for every page to page combination if that makes any sence.
Is there a way say - right no rewind the fade in a go to here.
Using flash 8 by the way
hope some1 can help
Much appreciated.
Stuart.
-
the best (I think) is the use of ActionScript. here some sample code.
PHP Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
function FadeUp(who,FadeTime){
var myTween:Tween = new Tween(who, "_alpha", mx.transitions.easing.Regular.easeIn, 0, 100, FadeTime, true);
}
function FadeDown(who,FadeTime){
var myTween2:Tween = new Tween(who, "_alpha", mx.transitions.easing.Regular.easeIn, 100, 0, FadeTime, true);
}
//How to use
btn1.onRelease = function(){
FadeDown(MovieClipName,5)
setInterval(FadeIn(MovieClipName,5),1*1000);
}
This is untested - its late for me. Will check back later.
-
Cool stuff thanks for the reply.
Now im not a total newbie to flash, i can do all the graphics side and tweening and what not, it's just the AS im new to.
So breifly how would i implament this. i started doing it but it's giving me an error at the min.
-----------------------------------------------------------------
**Error** Scene=Scene 1, layer=Layer 3, frame=1:Line 1: Statement must appear within on handler
btn1.onRelease = function(){
Total ActionScript Errors: 1 Reported Errors: 1
-----------------------------------------------------------------
I get this when adding the following actions script to the button:
-----------------------------------------------------------------
btn1.onRelease = function(){
FadeDown(MovieClipName,5)
setInterval(FadeIn(box1,5),1*1000);
}
----------------------------------------------------------------
Many thanks.
-
if you want to apply to the btn itself then use this code
PHP Code:
on(Release){
FadeDown(MovieClipName,5)
setInterval(FadeIn(box1,5),1*1000);
}
-
Ok cool stuff.
That works as in when i click the button a movie clip that is alpha 0% appears in then fades out slowley.
How much work is involved if i want say....
3 buttons, 3 movies clips with contents of some sort to fade in when the relevent button is hit.
Then when you hit the next button that content fades out and in with the new.
I have managed to make this using tweens and all sorts, it's just i have to make all the different combinations of the content fading with eachother and the more buttons the more work and it just seems super excessive.
Is there a way that somehow once the next button is pressed, the content thats already present fades away then the new stuff comes into play?
Many thanks.
-
give me a little bit and will make you a sample in flash 8.
-
Sir.. you are a legend.
I wait in anticipation.
Thank you.
-
Shoot me an email - so I can send you the sample. {email address in footer}
-
Hmm.. still no luck unfortunatley.
Am i going about this the wrong way.
All i want to happen is for a said content (MC) to fade away and bring in the new MC depending on what button was hit. A simple navigation on a website.
Having real trouble working this issue out and have posted on many forums.
Am i chasing a wild goose here or can this be done?
-
Check your email - Yes it can be done
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|