1 Reply Latest reply on Jun 15, 2007 6:12 AM by BeniRose

    NetStream play issues

    supdun
      video doesnt play if NetConnection and NetStream is instantiated inside function. But when I place them outside the function the video plays fine. Im stumped, anyone know whats going one?
        • 1. Re: NetStream play issues
          BeniRose
          When you instantiate a variable in a function, it's local only to that function and gets destroyed after leaving the function. You have it right in the second set of code, but you don't even need to set them to anything to begin with.
          You can put your variable declarations outside of your function like this: