4 Replies Latest reply on Jan 12, 2010 12:43 AM by RobHack

    User counters in director apps

    vrthree

      Hi

       

      I am developing a touch screen app for a client, they would like to be able to analyse how many people use view the content (much like google analytics). Is this doable in Director MX 2004?

       

      Thanks

        • 1. Re: User counters in director apps
          Sean_Wilson Adobe Community Professional

          Yes it's possible, but you're going to have to provide some more info. Do you need "unique" users? If so, you'll likely need them to log in (if this is a kiosk). Otherwise, you'll need to generate some sort of hardware key. How do you intend/hope to collate this information - an on-line database, or ... ?

          • 2. Re: User counters in director apps
            vrthree Level 1

            They are just after the amount of time the content is activated, in a form of a counter on the system somewhere, I also need to set an action where if the content is not viewed for 2 minutes or so it resets back to frame 1. Checking how many frames and buttoms are cliked would be good!

             

            Thanks

            • 3. Re: User counters in director apps
              Sean_Wilson Adobe Community Professional
              They are just after the amount of time the content is activated, in a form of a counter on the system somewhere

              So you set the start time when the "content" is entered and store the time difference it when it's finished. There's nothing particularly complicated about this - see the docs for 'milliseconds' or use the date object and its undocumented 'seconds' property.

              I also need to set an action where if the content is not viewed for 2 minutes or so it resets back to frame 1

              This isn't too complicated either. Read up about timeouts (objects) and their period, and/or 'the timeoutLength'

              Checking how many frames and buttoms are cliked would be good!

              So add code to frames/buttons that monitors this.

               

              If you need specific help then feel free to ask. All of what you outline is achievable but it's not clear if you need help with some part of it or you were just asking a general "can I ..." question

              • 4. Re: User counters in director apps
                RobHack Level 1

                I have done this for a Kiosk and it works very well

                 

                I put a value into a cast member every time certain buttons are pressed. This then I write to a text file when ever the kiosk is idle.

                 

                To find when it is idle, I use a timer which starts after any activity, when the timer reaches the set value the cursor is sent to a "intro" loop. A script writes the values to the text file .... to write the file I use Buddy API http://www.mods.com.au/budapi/default.htm

                 

                Rob H

                 

                Button script

                put value(member("button1").text)
                  member("button1").text = string(value(member("button1").text) + 1)

                 

                 

                Write script

                on exitFrame me
                  --exitframe SaveUsage 
                  Pth = "c:\project\Stats\"
                  pc = member("Computer-Name").text
                  day = member("Power-on-D").text
                  ver = member("Ver-No").text

                 
                 
                  --  insert PC Name, date & time
                  ok = baAppendFile( "c:\project\Stats\use.csv", pc)
                  ok = baAppendFile( "c:\project\Stats\use.csv", "||")
                  ok = baAppendFile( "c:\project\Stats\use.csv", day)
                  ok = baAppendFile( "c:\project\Stats\use.csv", "||")
                  ok = baAppendFile( "c:\project\Stats\use.csv", string(_system.time()))
                  ok = baAppendFile( "c:\project\Stats\use.csv", "||")
                  ok = baAppendFile( "c:\project\Stats\use.csv", string(_system.date()))
                  ok = baAppendFile( "c:\project\Stats\use.csv", "||Ver ")
                  ok = baAppendFile( "c:\project\Stats\use.csv", ver)
                  ok = baAppendFile( "c:\project\Stats\use.csv", "||")
                 
                 
                 
                  --  insert "button1" button usage
                 
                  --  ok = baAppendFile( "c:\project\Stats\use.csv", "||Button 1||")
                  home = value(member("button1").text)
                  ok = baAppendFile( "c:\project\Stats\use.csv", string(home))
                  ok = baAppendFile( "c:\project\Stats\use.csv", "||")
                  put 0 into member("button1")
                 
                  --  insert range button usage

                end

                 

                As you see I write additional information this helps with the stats anaylisis. BTW the csv file is imported in to excell fro charts/graphs etc...

                With this info I can tell;

                when the pc is turned on

                the data is written every 5 min (after idle starts or on shut down)

                as the time is writen with the data time of data can be established

                etc etc

                 

                see attached excel file for final file ....