A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: stand-alone player: prevent starting multiple instances

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    9

    stand-alone player: prevent starting multiple instances

    i have a flash movie, distributet as stand-alone player both for mac and pc on cd-rom.

    now: is it possible to control the use of the application through a network? not restricting anything, it is possible to share the movie on the cd-rom (or copied to the local hard drive), so that anyone (the administrator allows) can start the player. if i want not allow that, how could i do that? i only see the possibility to prevent that multiple instances of the stand-alone player can be startet. is that possible? are there other solutions?

    thanks a lot,
    noah

  2. #2
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    Erm, the admin of any network, enterprise or otherwise can give / take / omit control of specific files, from specific networks / directories, to specific people, on specific machines, to any specific number of people.. even one.

    But if its a normal user on at home. They can replicate it over and over and over and over again. That's where you have to check the "Cannot be replicated" button on some CD Burning software that prevents files from CD's to be copied, replicated or relocated to a HD. But even that can be cracked.
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  3. #3
    Junior Member
    Join Date
    Jul 2002
    Posts
    9
    thanks for your reply. i'm not sure, if you understood my problem correctly. sure, i know, that it isn't possible to prevent copying a cd-rom or copying its content to a harddrive. but i think it should be possible to tell the program, that it can't be startet more than one time at the SAME time, that not more than one instance of a program can be started. that would solve the network problem: this way, only one user of the network could use the software at the same time.

    but i guess, flash doesn't support a feature, to control those things...

    noah

  4. #4
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    Oh, well, if you are running it over a network, any admin can set it so it will check if a file is being accessed / used currently, even by the same person, where it will not allow you to access a certain file again if it is currently running, or being accessed. Or in your case, run multiple instances of your flash file. When someone tries to run it while its already running, whether on another computer or their own, it brings up admin screen saying its currently in use plz play again, or whatever the admin sets it to say.

    Similar to how in MSword, if someone has a file open from a file server, someone else can't open it to edit, but can open it to read, which can be changed so that file can't be opened at all if it is being accessed.

    To set this, the admin would have to know how to set file / directory access profiles for its' network's users.

    //--

    But I may have a solution to your problem using cookies and a loader swf file. And adding one piece of code to the content swf file.

    What to doFrom the point of view that this is a stand alone projector file.

    //--
    1. In your content swf file, the one you want ppl to run. Add a script that will put a cookie on the user's computer with today's date.

    2. Create a button or exit, for ppl to use to close your application. The script for the button will change the cookie to read "closed" instead of the date.

    //--
    Create a 3 frame swf "container" movie.

    Frame 1 tell it to check for that cookie, and compare the cookies' date with the real date.. if it is the same day go to frame 2 and stop.. if it is not the same day, go to frame 3 and load your content swf.

    Frame 2 output something like "Sorry you are already running this app"

    Frame 3 load the content swf.

    //--

    Logic.

    When ppl run your application the first time, the loader swf will check for a cookie that does not exist, therefor the date will not match, thus going to frame 3 and loading your content swf.

    When the content swf is loaded, it will write the cookie into the user's computer with the date, the date is always unique so its the best checker.

    When the user ends their session by clicking the exit button or close button, they change the cookie property to say something else instead of the date. So if they run it again, it will let them because the cookie doesn't have the current date.

    Now if the application is still running, and they run the file again, it checks the date, and it will match the current date, thus going to frame 2 saying, you're already running the file.

    //-- Troubleshooting.

    Sometimes people's computers will crash, and because of this, the system may shut down with the cookie reading the date, preventing them from opening the application again.

    To fix this simply create a file / script / swf that a person can load to rewrite the properties of the cookie so they can run the application again.

    I suggest this because telling someone to delete all their cookies from the puter is not really a good thing to do.
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  5. #5
    Junior Member
    Join Date
    Jul 2002
    Posts
    9
    hey, thanks a lot! i got the idea! clever solution. i'll try it out asap...

    noah

  6. #6
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    np lemme know how it turns out.
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center