1 Reply Latest reply on Aug 27, 2006 6:54 AM by Newsgroup_User

    Basic SWF ?: 3 movies playing consecutively

    plaine300
      Ok, so this is a 101 question, but I'm stuck on stupid. I have 3 SWFs in my Director movie. I want the first to play until it finished, then the second to start and plays until it finishes, then the 3rd to start and play until it finishes. However, as you may imagine with now lingo in there, they all 3 play simultaneously because they're on the same timeline. I know how to do the Quicktime movies to start and play until frame X and then go to the next marker, but how do I do that with SWFs? Thank you.
        • 1. Re: Basic SWF ?: 3 movies playing consecutively
          Level 7
          Its very similar. If your swf files are not single frame then you can
          use the member's frameCount property to find out how long it is and then
          use the ._currentframe property of the sprite to find out where you are.

          An example behavior might look like this:

          -----------
          property thisSprite
          property memberDuration
          property whereToGo

          on getPropertyDescriptionList
          myPropList = [:]
          myPropList.addProp(#whereTogo,[#comment:"pick a marker to jump
          to:",#format:#marker,#default:""])
          return myPropList
          end

          on beginSprite me
          thisSprite = me.spriteNum
          memberDuration = sprite(thisSprite).member.frameCount
          end

          on exitFrame me
          if sprite(thisSprite)._currentframe >= memberDuration then
          go to whereToGo
          end if
          end
          -----------

          If your swf files are built in a single frame on the main timeline then
          you'll have to include some sort of a telltale in the original Flash
          movie to tell Director when the swf has reached it's end. If there is a
          final frame or event in one of the movieClips then you could have that
          frame or event call a function in a behavior attached to the Flash
          sprite in Director.

          For instance, in the Flash movie you could have something like this:

          in the last frame of a movieClip:

          getURL("event:movePlaybackHead");

          and then in the Director movie, you could have a behavior like this
          attached to the Flash sprite:

          -----------
          property thisSprite
          property whereToGo

          on getPropertyDescriptionList
          myPropList = [:]
          myPropList.addProp(#whereTogo,[#comment:"pick a marker to jump
          to:",#format:#marker,#default:""])
          return myPropList
          end

          on beginSprite me
          thisSprite = me.spriteNum
          end

          on movePlaybackHead me
          go to whereToGo
          end
          -----------

          You can also write move function in a movie script window and call the
          function and include a parameter if you like to tell the playback head
          where to go. You might send the name of the marker to move to in that
          case. Or you could build a list of the markers to use in Director and
          then refer to each one as an argument in the function call as a number.

          --
          Rob
          _______
          Rob Dillon
          Adobe Community Expert
          http://www.ddg-designs.com
          412-243-9119

          http://www.macromedia.com/software/trial/