1 Reply Latest reply on Sep 1, 2006 4:07 AM by Newsgroup_User

    Sound problem

    Tård
      Hi!

      I have some problems with playing sound in Director. I put the sound file in soundchannel 1.

      So I use this code:

      sound(1).volume = 20

      But when I use this code in the same behavior:

      sprite(me.spritenum).camera.fieldofview = 10.25

      then i get this script error:

      Script Error: Number expected

      sprite(me.spritenum).camera.fieldofview = 10.25?

      perhaps the fault is that the value of the fieldofview is a float or something?

      Is tther som code we have to add to get this to work?

      Thanks!
        • 1. Re: Sound problem
          Level 7
          T?rd wrote:
          > I have some problems with playing sound in Director. I put the sound
          > file in soundchannel 1.
          >
          > So I use this code:
          > sound(1).volume = 20
          >
          > But when I use this code in the same behavior:
          > sprite(me.spritenum).camera.fieldofview = 10.25

          The two are completely unrelated.

          > then i get this script error:
          > Script Error: Number expected

          You have to tell it which camera. Checking the help files would have shown
          you immediately...

          Andrew