At 3/23/05 04:26 PM, WadeFulp wrote:
At 3/23/05 04:24 PM, JustLikeFrank wrote:
Isnt there a way you can use sessions so that when the movie window is opened a session var is set with the current time, then on the vote page it compares the time the var was set to the current time. That could be used for when people deposit as well, to see if people just vote on 5 movies quickly to get the experienceI believe this is only possible if both windows are coming from the same domain. However, since the content window is coming from a different domain (the .swf file is on another domain), variables like this can't be shared.
Here's how I would go about doing something similar... but I've hardly worked with Flash at all, so I could be dead wrong on a couple integral parts.
UUN will return a time to the XML sockets, and that movie will use a SharedObject to store the time to store how long until voting will be allowed (this would have to be an ID unique to the movie, i.e. based on the movie's ID).
While all this is going on, the flash movie for the voting panel (also loaded from uploads.ungrounded.net) will constantly be looking for the SharedObject, and when it finds that it exists, it will decrement the time until the time hits 0 (or whatever method is convenient); when it's time to allow voting, the SharedObject is deleted.
When the user finally votes, the same variables that were loaded into the first flash movie are again passed to UUN but with an updated time, which is verified against sessions or a table in a database.
AFAIK, the only other change required would be to move the voting database/mechanisms to UUN, or to allow UUN to access a certain table on newgrounds.com.
Just for the sake of argument, did anyone catch if there were any glaring errors in my logic here?