1 Reply Latest reply on Mar 12, 2013 5:40 PM by zDreams

    Control quicktime video loading external with lingo

    anjemalo Level 1

      Hello:

      I have a director 11.5 movie in wich I need to show several quicktime videos. When the user click button  one (5 buttons) the video 1 plays. Is possible in the same Director movie to loadthe requested video changing the cast or sprite in fly?

      can you tell me how, please?

       

       

      Thank you very much.

        • 1. Re: Control quicktime video loading external with lingo
          zDreams

          You can swap video sprites on the fly, just like images. If you had "video1" and "video2" in your cast, and sprite channel 1 was video1 you could do something like this:

           

          on mouseUp me

            myVideo = sprite(me.spriteNum).member.name

            if myVideo = "video1" then

               myVideo = "video2"

            else

              myVideo = "video1"

            end if

            sprite(me.spriteNum).member = myVideo

          end

           

          If you have a lot of videos you could handle them like this:

           

          property pMyList, pNum

           

          on beginSprite me

            pMyList = ["video1", "video2", "video3", "video4"]

            pNum = 1

          end

           

          on mouseUp me

            -- increment list value

            pNum = pNum + 1

            if pNum > pMyList.count then

              pNum = 1

            end if

            myVideo = sprite(me.spriteNum).member.name

            -- use list element to determine which cast member to display

            sprite(me.spriteNum).member = pMyList[pNum]

          end