-
As for timings, you change that here:
new Tween (pics_mc.yellow_mc, "alpha", None.easeInOut, 0 , 1 , 2 , true );
Since the last parameter is true, you are measuring in seconds. so the 2 indicates the tween should take 2 seconds. However, the easing function None.easeInOut will make is slower at the beginning and end the way you have it set up.
As for the other part, I will see if I have time to explain this. It may have to be modified slighly based on what you are saying about the text. I am not entirely sure what you are trying to do with the background colors. I get that you want the color to change and then the text to fade in, but how should the color change? Is there any transition at all, or does it just jump from one color to the next?
-
hey again, adn thanks for the response
what do the other numbers stand for?
how do i start the texts 1 second after the pictures?
yes no transation for the background colours
the squares behind the text just change then text fades ontop
Thankyou again for helping me :)
-
Basic tween structure is:
new Tween (object being tweened, property being tweened, easing function, start value for property being tweened, end value for property being tweened, how long the tween should take in frames or seconds based on the final parameter, whether to use seconds or frames as the unit of measure true means use seconds false means use frames)
-
This is starting to be a little more dependent upon movie structure, than I like, but if you replace the text code with:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var text1Tween:Tween = new Tween (text_mc.text_1.text_mc, "alpha", None.easeInOut, 0 , 1 , 2 , true );
text1Tween.stop();
text1Tween.addEventListener(TweenEvent.MOTION_FINI SH,fadeOutText);
if (text_mc.numChildren > 1) {
for (var t:int = text_mc.numChildren-1; t>=0; t--) {
var tclip:Object = text_mc.getChildAt(t);
tclip.alpha = 0;
if (t > 0){
tclip.nextClip = text_mc.getChildAt(t-1);
}else{
tclip.nextClip = text_mc.getChildAt(text_mc.numChildren-1);
}
}
text_mc.getChildAt(text_mc.numChildren-1).alpha = 1;
}
text1Tween.start();
function fadeOutText(event:TweenEvent) {
event.target.removeEventListener(TweenEvent.MOTION _FINISH, fadeOutText);
event.target.addEventListener(TweenEvent.MOTION_FI NISH, startNextText);
event.target.begin = 1;
event.target.finish = 0;
event.target.start();
}
function startNextText(event:TweenEvent) {
event.target.removeEventListener(TweenEvent.MOTION _FINISH, startNextText);
event.target.addEventListener(TweenEvent.MOTION_FI NISH, fadeOutText);
event.target.obj.parent.alpha = 0
event.target.obj = event.target.obj.parent.nextClip.text_mc;
event.target.obj.parent.alpha = 1
event.target.begin = 0;
event.target.finish = 1;
event.target.start();
}
-
it gives me this error
TypeError: Error #1010: A term is undefined and has no properties.
at test_fla::MainTimeline/frame1()
-
Are you using the fla I posted?
-
Absoultley super! :D
thankyou so much
all i need to know now is how to make the clips pause for a given ammount of time before continuing onto the next fade
could you show me how?
thanks for everything :D
-
Hi
i found this script and am having trouble as where to put it in the code we already have
Code:
var timelinePause:Timer = new Timer(3000, 1);
timelinePause.addEventListener(TimerEvent.TIMER, timerHandler);timelinePause.start();
function timerHandler(evt:Object):void {this.play();}
-
can no one except kortex tell me where to put
this
Code:
var timelinePause:Timer = new Timer(3000, 1);
timelinePause.addEventListener(TimerEvent.TIMER, timerHandler);timelinePause.start();
function timerHandler(evt:Object):void {this.play();}
in here
Code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var Pic1Tween:Tween = new Tween (pics_mc.pic1_mc, "alpha", None.easeInOut, 0 , 1 , 2 , true );
Pic1Tween.stop();
Pic1Tween.addEventListener(TweenEvent.MOTION_FINISH,fadeOut);
var Pic2Tween:Tween = new Tween (pics_mc.pic2_mc, "alpha", None.easeInOut, 0 , 1 , 2 , true );
Pic2Tween.stop();
var Pic3Tween:Tween = new Tween (pics_mc.pic3_mc, "alpha", None.easeInOut, 0 , 1 , 2 , true);
Pic3Tween.stop();
pics_mc.pic1_mc.nextTween = Pic2Tween;
pics_mc.pic2_mc.nextTween = Pic3Tween;
pics_mc.pic3_mc.nextTween = Pic1Tween;
Pic1Tween.start();
function fadeOut(event:TweenEvent) {
event.target.removeEventListener(TweenEvent.MOTION_FINISH, fadeOut);
event.target.addEventListener(TweenEvent.MOTION_FINISH, startNext);
event.target.begin = 1;
event.target.finish = 0;
event.target.start();
}
function startNext(event:TweenEvent) {
event.target.removeEventListener(TweenEvent.MOTION_FINISH, startNext);
event.target.obj.nextTween.addEventListener(TweenEvent.MOTION_FINISH, fadeOut);
event.target.obj.nextTween.begin = 0;
event.target.obj.nextTween.finish = 1;
event.target.obj.nextTween.start();
}
so the pics will pause for a bit before fading out?
THankyou
-
-
Would you be ok with using a custom class I created?
-
Actually this may work for you and is simpler.
function fadeOut(event:TweenEvent) {
event.target.removeEventListener(TweenEvent.MOTION _FINISH, fadeOut);
event.target.addEventListener(TweenEvent.MOTION_FI NISH, startNext);
event.target.begin = 1;
event.target.finish = 0;
setTimeout (event.target.start, 3000);
}
-
hi and thanks for come back to help me, really apprecitate it
what it does now is the first pic it fades in fades out waits 3 seconds then fades out again then no others fade in
Thanks
-
Is working on mine. All three fade in and out as expected.
-
oops i edited the wrong bit, it does work, it works perfectly
i cant begin to thankyou enough for all your patience and help
thankyou so much
:D
-
oo one more thing, how can i do it so there is pause time before the fade in starts
-
i figured that one out :D
really, thankyou so much :D
-
Well if you are just trying to add some time at the beginning and end of the animation, you can do all that with the easing function. I would try playing with the easing function and the duration of the tween:
var yellowTween:Tween = new Tween (pics_mc.yellow_mc, "alpha", Strong.easeInOut, 0 , 1 , 5 , true );
An easing function slows the transition. since you have it set to easeInOut, it will be applied to the beginning and the end of the tween which is directly related to its length.
so remove the time out thing from the last post and change the easing to what I have in bold above and then play with the length value until you get the effect you are looking for.
-
ooo again one more lol
just wondering if you knew how to cross fade?
i need to do another thing amlost the same with a crossfade on teh backgrounds
Thankyou
-
google is so sparse on actionscript 3 help, theres practically nothing anywhere, googling actionscript 3 crossfade brings up absolutley nothing
is crossfading harder on as3? no one done it yet?