This content has been marked as final. Show 6 replies
as2 or as3?
prob. 2 right now but if you also have one for 3 that could help me in the future when I upgrade it.
in as2, use the loadvars class with its sendAndLoad() method to execute a php script that opens a text file, reads a variable's vlalue, increments the variable, closeds the file and send (echo) that updated value back to flash where you can use the onLoad method of your loadvars object to display that variable's value.
in as3, use the urlloader class to execute the php script.
do you have a tutorial or example of this in action - I am a visual learner
Thanks For The Help So Far!
actually, this is going to be fairly complex. because you can't send anything from flash to indicate a user navigating away from your site or closing their browser window, you'll have no easy way to determine when a user leaves your site.
you'll need to see if you can create a php script that checks for the existence of the flash file every minute or so to determine is that user needs to be deleted from the current active user list.
this is a php issue. the flash side coding i can help you with, but that's not the main problem.
>> you'll need to see if you can create a php script that checks for the
existence of the flash file every minute or so to determine is that user
to be deleted from the current active user list.
Which, from what I know of php, cannot be done as it just executes once and
dies. I don't think you can write a server in php. Java maybe... FMS?
Adobe Community Expert