Results 1 to 6 of 6

Thread: Sequential MC Tweens

  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sequential MC Tweens

    Hi guys,
    New to the forum and hope some of you can help. Ive recently downloaded mc tween. (Cant believe I've left it until now, considering its power). Anyway - having a small prob with chained, or sequential tweens.

    For example:
    I have a movie entitled mc on my main stage. Its colour is ffffff.

    I wanted to change it to red, (ff0000) then back to white in 4 seconds. But it wont seem to work quite as desired. IT WILL CHANGE TO RED, BUT WONT REVERT TO WHITE as soon as the 4 seconds are up. The code is as follows.

    onClipEvent (enterFrame) {
    _root.mc.colorTo(0xff000, 0.5, linear, 0);
    _root.mc.colorTo(0xffffff, 0.5, undefined, 4);
    }


    The colours arent important here, ive just used them for the examples sake. I have had the same problem with all of the mc tween prototypes.

    Ive tried various things, including creating a second clip for the delayed action to address. It actually worked, so it seems the problem lies in the fact that I'm addressing the same clip twice, but of course - thats what I need here.

    Any of you guys got any advice?
    It will be gratefully received if so.

    Best
    Sub

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Not to sure about mctween as a whole, makes for some nasty code and really only works well with AS1. You might be better off coding and tweening by hand.

    Either way...

    your code is what is wrong here, not the tween, you have an on Enter event happening, and you are telling the MC to do 2 things at once. Thats like me telling you: "as soon as you walk in the door, go to the kitchen and go to your bedroom" You can't do it.

    Your best bet is to use an alternate slice of coding. Tell it in enter to go white. Start a count down from 4 seconds, add an if statement telling the MC to go red when time == 0; then restart the counter and tell it to go white when timer reaches 0 again.

    That would be the easiest way, and least sloppy, at least while using a 3rd party app. like mctween.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Blizzard,
    Cheers for the reply. Point taken on the coding! However, the way MC Tween is set up, is thus:

    e.g
    _root.mc.colorTo(0xffffff, 0.5, undefined, 4);

    Where the final '4' is actually the delay before that particular line is executed. Hence i thought that would take care of the issue you outlined.

    It turns out that the code should actually be applied to the frame and not the clip itself. Works like a treat. You really think Mc Tween is bad? Ive been using flash for years, but have only began in the last few months to delve deeper into AS. Already I'm finding the power offered by MC Tween (at least in light of the lack of effort required) to be quite brilliant.

    Cheers again
    Sub

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    I am not saying it is bad I guess I am just too "old school"

    I like doing things by hand. That way, when something breaks I know where to go to look to fix it. I also still use plain old notepad for hand coding all my 20,000+ web pages I have created over the last so many moons.

    Glad you got it working though
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. #5
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ha! 'Textpad' is the daddy, I find. But each to his own, as they say!

  6. #6
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Notepad+ is pretty good too I hear, but I am stubborn
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

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