4 Replies Latest reply on Mar 18, 2010 9:45 PM by David Mainstreet

    moviescript not working when flash file is on stage

    David Mainstreet

      My on keydown script won't work as long as I have a swf file on the stage that has a text input field in the first frame, which I use to set a variable in the swf.

       

      Even though I go to another frame in the swf file without the text input field, I still can't use keydown in Director.

       

      If you know of any lingo tricks that would be great.

       

      Or plan B would be to set the variable in Director and pass it to a swf that has no text input field.  But I'm not sure how to pass variables to a swf.

       

      And the lingo I've seen online doesn't work for my swf named "digitalclock" that has a variable "hours":

       

      sprite("digitalclock").setVariable(hours, 1)

       

      Or plan A would be if you know of any digital clocks in director that can have their starting hours and minutes set by the end user.

       

      thanks

        • 1. Re: moviescript not working when flash file is on stage
          Sean_Wilson Adobe Community Professional

          There are lots of possible solutions.

           

          There has to be a better way than what you are currently doing (setting the text of an input to get a variable into Flash). Can you attach your SWF and/or its FLA file to a reply - that way I can poke around in it to figure out what to set how and when.

           

          Have you looked at the countdown timer in the library palette? It might give you ideas of how to code this.

           

          Perhaps you could step back a little and explain your objective (I need a clock on the stage that displays time in the format HH:MM:SS, but I need the end user to choose the start time)

          • 2. Re: moviescript not working when flash file is on stage
            David Mainstreet Level 1

            Sean-

             

            Thank you for your response.

             

            I've attached a fla that I realized isn't going to do the trick unless 

            I code it to add or subtract from the system time. Adding worked but 

            not subtracting. And I've run into problems with the flash file inside 

            Director.

             

            So I've given up on flash and am now coding a clock from scratch in 

            Director because the end product is (in essence) a Director kiosk. 

            Director is what we use for computer screens in movies and television 

            scenes. In this case we need a clock in one corner of the screen that 

            can easily be set to whatever hour or minute is needed for a 

            particular scene.

             

            We have code for countdown clocks but not for regular clocks and the 

            only thing I could find on the internet is flash. It's been years 

            since I've used flash so it's been a big problem, which is why I went 

            back to director.

             

            But if you have a solution, I'd be happy to hear it.

             

            Thanks

             

            David Watkinson

            • 3. Re: moviescript not working when flash file is on stage
              Sean_Wilson Adobe Community Professional
              There are lots of possible solutions.

              Here is one overly simplistic demonstration.

              • 4. Re: moviescript not working when flash file is on stage
                David Mainstreet Level 1

                This is what I need - thank you very much!!