A Flash Developer Resource Site

Results 1 to 20 of 40

Thread: [CS3] Help With my code!

Hybrid View

  1. #1
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    Will also work for your other clips. As long as they are all going to use the same timings, then this should be fine:
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    import fl.transitions.easing.*;
    var yellowTween:Tween = new Tween (pics_mc.yellow_mc, "alpha", None.easeInOut, 0 , 1 , 2 , true );
    yellowTween.stop();
    yellowTween.addEventListener(TweenEvent.MOTION_FIN ISH,fadeOut);

    if (pics_mc.numChildren > 1) {
    for (var c:int = pics_mc.numChildren-1; c>=0; c--) {
    var clip:Object = pics_mc.getChildAt(c);
    clip.alpha = 0;
    if (c > 0) {
    clip.nextClip = pics_mc.getChildAt(c-1);
    } else {
    clip.nextClip = pics_mc.getChildAt(pics_mc.numChildren-1);
    }
    trace (pics_mc.getChildAt(c).name)
    trace (clip.nextClip.name)
    }
    }


    yellowTween.start();

    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;
    event.target.start();
    }
    function startNext(event:TweenEvent) {
    event.target.removeEventListener(TweenEvent.MOTION _FINISH, startNext);
    event.target.addEventListener(TweenEvent.MOTION_FI NISH, fadeOut);
    event.target.obj = event.target.obj.nextClip;
    event.target.begin = 0;
    event.target.finish = 1;
    event.target.start();
    }
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  2. #2
    Member
    Join Date
    Aug 2008
    Posts
    39
    how do i set the timings?

    i dotn get some of the code, could you explain it to me please?

    also with the text movie clips i with the backgrounds (the big squares) i didnt want the squares to fade in, just to change colour then the text fades ontop of it

    thankyou so much for your help though, youve been so helpful so far
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center