5 Replies Latest reply on Mar 3, 2010 6:38 AM by linzie-dawn

    Help with controlling a flash video in director

    linzie-dawn

      I have imported a flash file into my director movie and would like a replay button but can not

      find the correct lingo. The flash file is called equation. Any help appreciated!! thank you

        • 1. Re: Help with controlling a flash video in director
          Robert Crowe Level 1

          I don't think you can just import an FLV file into Director, so I'll assume that you've imported an SWF.  The SWF becomes a Flash sprite, to you can refer to it as sprite("sprite name here"), and make ActionScript 2.0 calls into objects and classes inside it like this:

           

          spr = sprite("equation")

          spr.trace("hello world")

           

          Your video is an object inside your Flash sprite, so you'll need to know the instance name inside Flash.   If you can't find the instance name I think you're hosed.  Let's say the instance name is "fred", then the standard video methods should work:

           

          spr.fred.play()

          spr.fred.pause()

          spr.fred.stop()

           

          You'll also need to play with the Flash sprite properties, and it seems like I need to have DTS checked.

          • 2. Re: Help with controlling a flash video in director
            Sean_Wilson Adobe Community Professional

            A minor correction to Robert's post: if you are using D11.5 then you  can import an FLV file as #flv. However, the file remains linked so you  have to ship the FLV file with the published Director movie. You can  control an FLV sprite (that references an #flv member) with  sprite.seek(0) and sprite.playRate = 1.0/0.0 to rewind, play and pause  it.

            • 3. Re: Help with controlling a flash video in director
              linzie-dawn Level 1

              The spr=sprite("equation")

              creates an error in my coding.

               

              It is an swf file I am using, where would I find the instance name in flash?

               

              Thank you

              • 4. Re: Help with controlling a flash video in director
                Mike Blaustein Level 4

                You would need to name the SPRITE "equation" for that command to work.  If you are not familiar with sprite

                naming, then you can use:

                 

                spr=sprite(3)

                 

                ...where 3 is the CHANNEL number of the swf sprite.  Change that to whatever channel the sprite is in.

                 

                In Flash, you would open the FLA that was used to create this swf and click on the instance on the stage of the object.  In the top right of the screen it will show the instance name - if the instance name is not set yet, then it will say <Instance Name> and you can click it to set the name.

                • 5. Re: Help with controlling a flash video in director
                  linzie-dawn Level 1

                  Solved using the following method:

                   

                  spr = sprite("equation");

                   

                  function mouseUp()

                  {

                  spr.rewind();

                  }

                   

                  Thank you for all your help pretty easy in the end!