2 Replies Latest reply on Sep 2, 2007 6:38 AM by Syeed\

    Accessing Global Variable

    Syeed\
      Hi,
      I developed an application for FM2. I have around 6 .swf files used by 6 users. I need a global variable so that I can count the no. of clicks performed. Every time a user clicks, I need to increment a variable and this should go on irrespective of which user has clicked from which .swf file.
      I tried using _global method. But the variable is accessible only to one .swf file. What I am trying to do is that all instances of .swf file should use/update the same variable.
      Any help/suggestion is highly appreciated.
      Thanks & Regards,
      Shamsheer H. Syed
        • 1. Re: Accessing Global Variable
          Level 7
          I'm not familiar with FM2, so there may be a way to do what you want using
          it directly. But without it, I'd just call a PHP page on the server to have
          it increment a field in a database table.

          --
          Dave -
          Head Developer
          http://www.blurredistinction.com
          Adobe Community Expert
          http://www.adobe.com/communities/experts/


          • 2. Re: Accessing Global Variable
            Syeed\ Level 1
            Hi,
            Sorry for the incomplete and a little vague description. Actually I am using Flash CS3 to develop a VideoConference application on FMS2. I have around 6 .swf files used by 6 users. All the six users participate in the VideoConference.
            I need a save each video stream upon clicking on a particular button. I need to use a variable as counter and use it in naming the .flv file to be saved. i.e. each time a user clicks, I need to increment a variable and save the video. When clicked on other stream then counter needs to be incremented and this value needs to be saved in the .flv file. This should go on.

            I tried using _global method. But the variable is accessible only to one .swf file.
            What I am trying to do is that all instances of .swf file should use/update the same variable.
            Any help/suggestion is highly appreciated.

            I am using jsp page to load the .swf file. When the .jsp is accessed by six users then 6 .swf files will get loaded in their browsers. Now if I refer to a _global variable then it is available to each .swf file as its private copy.

            Please help me with any scirpt/code that you have to be able to resolve this issue.

            Thanks & Regards,
            Shamsheer H. Syed