SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Run multiple tweens at the same time

    Hi all,

    I'm not a complete noob but there's plenty that I haven't tackled in Flash. I've done nearly all my work thus far in AS 2 (Flash 8).

    I'm trying to get two (or more) tweens to run at the same time (or nearly the same time). The closest I can get is using onMotionFinished, but that's not helping me solve the problem.

    For example, I'd like to get two shapes, say circles, to grow from _xscale = 0, _yscale = 0 to _xscale = 100, _yscale = 100. I can write the tweens for each one but I can't get them to run simultaneously.

    I'm guessing that multiple timelines are the thing that I need, but I can't figure out how to write the tweens so that they are on different timelines.

    The textbook that I'm using describes multiple timelines simply as events attached to different moveclips, such as:

    Code:
    myMovieClip1.onEnterFrame = function() {
        this._y = this._y + 20;
    }
    myMovieClip2.onEnterFrame = function() {
        this._y = this._y + 30;
    }
    but, I think there must be more to multiple timelines and tweens than my book is telling me.

    Anybody have any AS references or help that they'd care to pass along?

  2. #2
    SitePoint Wizard jim_morrison3's Avatar
    Join Date
    Apr 2004
    Location
    UK
    Posts
    2,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try to explore the Tween and Transition Classes available in Flash to achieve your goal.
    Good Luck!
    There are things known and Things unknown
    And in between are the Doors.
    I love hand Coding.


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
  •