A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: remote on/off client's site?

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    26

    remote on/off client's site?

    Hi, currently my client wants us to test the sample site on his hosting account. Of course that means we have to edit/update/create pages on his server and in a sense he's having the site without paying the final payment. I am afraid that upon completion, he will defer the payment and keep the site.

    I am wondering is there a script (actionscript/javascript) I could use to turn on and off of his site remotely?

    Thanks

  2. #2
    Senior Member
    Join Date
    May 2003
    Location
    Houston, TX
    Posts
    268
    Just put the index.html file on his server and then use javascript to pop the site into a window without a navigation bar. Point to the files on your server and all he gets is just the index.html page. Make it simple with just an index button. DO NOT PUT THE FILES ON HIS SERVER!!!

    Also, do you have a contract that will protect you from getting screwed? If not, you are living dangersously.
    "Leading the business of today into the future of tomorrow"

  3. #3
    poet and narcisist argonauta's Avatar
    Join Date
    Nov 2001
    Location
    Under the bed
    Posts
    2,080
    all those conditions the client specifies can be accomplish, as long as there's a contract to protect you from any bad intentions he could have.

    Also, if the site is in flash, you could add a watermark or something (the same if it's html, add watermarks in the pics) so the site works and all, but clearly says it's only a demo. So, even if the client steals the website, it would be kind of worthless.
    my blog: blog.innocuo
    Sponsored by your mom.

  4. #4
    Junior Member
    Join Date
    Dec 2000
    Posts
    26
    thanks for the index.html idea. Yes, I do have a contract in place.

    Just wondering, is it possible to use an "if/else" script to do a check on my server and if it's false, then redirect the site to somewhere else?

  5. #5
    Senior Member SubwayDesigns's Avatar
    Join Date
    Oct 2002
    Location
    Lausanne, Switzerland
    Posts
    143
    Here you go... I use it all the time:

    Code:
    protocol = _url.substr(0, _url.indexOf(":"));
    if (protocol == "file") {
        message = "It appears you are trying out this SWF on your local hard disk. That's ok, but be aware that this movie will only work if played from its source site.";
    } else if (protocol == "http") {
        doubleSlash = _url.indexOf("//");
        server = _url.substr(doubleSlash+2, _url.indexOf("/", doubleSlash+2)-doubleSlash-2);
        server = server.toUpperCase();
        if (server.indexOf("WWW.")<>-1) {
            server = server.substr(server.indexOf("WWW.")+4, server.length);
        }
        if (server.indexOf("SUBWAYDESIGNS.NET")<>-1 or server.indexOf("SUBWAYDESIGNS.COM")<>-1) {
            nextScene();
        } else {
            message = "Sorry, this movie will only play from its source site... \nOffending website path: "+_url;
        }
    }
    box1 = prefix;
    Alongside this, I usually have an invisible movie clip on the main scene that loads a swf from my server

    Code:
    onClipEvent (load) {    loadMovieNum("http://www.subwaydesigns.net/projectname/security.swf", 0);
    }
    and I upload an empty swf to my server. If there's any problem during the project, I upload an swf that redirects the user to my website.

    I feel pretty secure with this. And a contract, of course, always a contract.

    -S

  6. #6
    Junior Member
    Join Date
    Dec 2000
    Posts
    26
    Originally posted by SubwayDesigns
    Here you go... I use it all the time:

    Code:
    protocol = _url.substr(0, _url.indexOf(":"));
    if (protocol == "file") {
        message = "It appears you are trying out this SWF on your local hard disk. That's ok, but be aware that this movie will only work if played from its source site.";
    } else if (protocol == "http") {
        doubleSlash = _url.indexOf("//");
        server = _url.substr(doubleSlash+2, _url.indexOf("/", doubleSlash+2)-doubleSlash-2);
        server = server.toUpperCase();
        if (server.indexOf("WWW.")<>-1) {
            server = server.substr(server.indexOf("WWW.")+4, server.length);
        }
        if (server.indexOf("SUBWAYDESIGNS.NET")<>-1 or server.indexOf("SUBWAYDESIGNS.COM")<>-1) {
            nextScene();
        } else {
            message = "Sorry, this movie will only play from its source site... \nOffending website path: "+_url;
        }
    }
    box1 = prefix;
    Alongside this, I usually have an invisible movie clip on the main scene that loads a swf from my server

    Code:
    onClipEvent (load) {    loadMovieNum("http://www.subwaydesigns.net/projectname/security.swf", 0);
    }
    and I upload an empty swf to my server. If there's any problem during the project, I upload an swf that redirects the user to my website.

    I feel pretty secure with this. And a contract, of course, always a contract.

    -S
    Thank you! But I am abit confused by the codes, could you explain them to me of how these are suppose to work?

    Like for the 1st set of codes, do I place that within the client's .swf (which is located on his server) Then upload the real .swf on my own server?

    Thanks

  7. #7
    Senior Member SubwayDesigns's Avatar
    Join Date
    Oct 2002
    Location
    Lausanne, Switzerland
    Posts
    143
    You should use the first code in the movie you're showing your client. This movie can only play from your domain, so the client can see it and show it to whoever he wants to, and can even downoad it on his computer and play it (if you want to allow this), but can't upload it to his own server. This means if something goes wrong, you still have control over the files. Commented the code a bit, hope it'll be clearer.

    Code:
    protocol = _url.substr(0, _url.indexOf(":")); // this is the variable for the address in the location bar (whatever appears before ":")
    if (protocol == "file") { // if it's a file
        message = "It appears you are trying out this SWF on your local hard disk. That's ok, but be aware that this movie will only work if played from its source site."; //display this message (you need a dynamic text field called "message" to catch this)
    } else if (protocol == "http") { //if it's on the web
        doubleSlash = _url.indexOf("//");
        server = _url.substr(doubleSlash+2, _url.indexOf("/", doubleSlash+2)-doubleSlash-2);
        server = server.toUpperCase();
        if (server.indexOf("WWW.")<>-1) {
            server = server.substr(server.indexOf("WWW.")+4, server.length); //check if it's on your designated server
        }
        if (server.indexOf("SUBWAYDESIGNS.NET")<>-1 or server.indexOf("SUBWAYDESIGNS.COM")<>-1) { //this defines your allowed servers
            nextScene(); // if it's on your server, go to the next scene
        } else { // otherwise diplay the following message
            message = "Sorry, this movie will only play from its source site... \nOffending website path: "+_url;
        }
    }
    box1 = prefix;
    So you put this on the first frame of your movie, in a separate scene, along with a stop action.

    This is the first security measure. The second one is a different idea; you let the client upload the movie to his own server, but on the movie you put an invisible movie clip that loads a separate swf on your server (not the movie itself, just a security movie). This security swf is initially empty, so the client won't see the difference. If something goes wrong, you just replace the security swf you kept on your server with a movie that redirects to your homepage when it loads. So when the client opens the main movie on his server (and consequently also opens the security swf on your server since the invisible movie clip is still there), he is redirected to your website.

    Hope this cleared things up a bit...

    -s.

  8. #8
    Junior Member
    Join Date
    Dec 2000
    Posts
    26
    Yes, this really clears things up.

    Once again, thank you for taking time to explain it to me.

    Thanks!

  9. #9
    Member
    Join Date
    Mar 2004
    Posts
    30
    Sorry for reviving a 20 days old thread but I woudl like to ask subway if this can be used to lease flash designs.

    Say if I have a flash intro that I lease to companies for a certain fee/month, I can easily turn the intro off if the company stop paying?

    To my knowledge Flash only allows access to file on local domain so if you are loading a blank movie for security from an external site it would not be possible isn't it?

  10. #10
    Senior Member SubwayDesigns's Avatar
    Join Date
    Oct 2002
    Location
    Lausanne, Switzerland
    Posts
    143
    Originally posted by enhostroy
    Say if I have a flash intro that I lease to companies for a certain fee/month, I can easily turn the intro off if the company stop paying?
    Yes, you could use it for that.


    To my knowledge Flash only allows access to file on local domain so if you are loading a blank movie for security from an external site it would not be possible isn't it?
    no, flash can load files from anywhere. Just use something like
    Code:
    loadMovie("http://www.yourdomain.com/security_file.swf", "hidden_mc");
    and it should work fine.


    -s.

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