FORUMS: list search recent posts

determining the root swf

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Donnolio
determining the root swf
on May 31, 2007 at 4:52:31 pm

I have a project with an admin side and a client side...and they share several AS Classes. Some of those AS Classes include calls to PHP that reads and writes to file. I want to make it so that when the admin has the file open, no client can write. The PHP has two ways to read and two ways to write: one of them has nothing to do with locking the file, and the other one locks it upon load, and unlocks it upon save. ...
The lock does NOT utilize PHP's locking mechanism; rather, to lock the file, it creates a file in the same directory whose existence indicates that the file is locked, while to unlock it, it deletes that file.

So...on the client side, I simply need to check for the existence of that file to determine whether I can write to file or not. Here's the issue: the admin side and the user side share some AS Classes, so rather than searching for all my saves on the client side and then first checking to see if it's locked; it would be nice if I can simply find out the filename of the SWF that is using the AS Script; can I find that out somehow using _root?



Return to posts index

Donnolio
Re: determining the root swf
on May 31, 2007 at 5:08:51 pm

Found it. _root._url gives me the filename of the root SWF I'm running under.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]