User Tag List

Results 1 to 8 of 8

Thread: Specific Sitelock Code

  1. #1
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Specific Sitelock Code

    Hey all. I've been asked by a sponsor to implement the following Sitelock code:

    Code:
    // returns true if the current swf is hosted on an MTVN domain, false otherwise
    function testSiteLock ()
    {
            var siteLock:RegExp = /^(http|https):\/\/([-a-zA-Z0-9\.])+\.(shockwave|addictinggames|mtvi)\.com(\/|$)/;
            return ( siteLock.test ( loaderInfo.url );
    }
    I had a go at understanding the regular expression myself, but apparently it wasn't correct. Would someone be so kind as to either recreate the above Actionscript in MMF2 events, or maybe even just copy-paste that into a new extension? If you did, you'd be scientifically proven to be pretty cool.

    Cheers!
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    oruga's Avatar
    Join Date
    Feb 2012
    Posts
    365
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    basically it says it should work with http and https followed by a string that can contain characters from a to z, from A to Z, numbers from 0 to 9 and the "-". then it should be followed by either shockwave, addictinggames or mtvi and end with a .com.

    So the sitelocking code that's floating around the forums should be adjusted to allow the game to run from shockwave.com, addictinggames.com and mtvi.com and any of their subdomains.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hopefully you got 3 lots of site lock cash Matt

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    redpandagames's Avatar
    Join Date
    Dec 2011
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you ever get this to work?

  5. #5
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Steven View Post
    Hopefully you got 3 lots of site lock cash Matt
    Actually it was an exclusive deal for Nickelodean, so they could put in on the sites they owned. It was pretty good!

    Quote Originally Posted by redpandagames View Post
    Did you ever get this to work?
    Mostly, yes. I think it was Sortacore, sorry, Phi, who got something as close to the original as possible. It never did quite lock on Shockwave.com though.
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export ModuleUnicode Add-on
    Pharanygitis's Avatar
    Join Date
    Aug 2006
    Location
    Germany
    Posts
    1,037
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great, I make a extension with this.. small sitelock extension

    EDIT: I have forgett.. a other good way for sitelocking is my "Local Flash Connection" extension. You make two flashfiles.. one is your game, and the other is a "hidden flash" on your site (On the same site as the game..). Now, you can communicate with the two flashfiles to checking - "Is the user on my site, or not?"

  7. #7
    Forum Moderator Multimedia Fusion 2 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    DizzyDoo's Avatar
    Join Date
    Oct 2006
    Location
    South England
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pharanygitis View Post
    Great, I make a extension with this.. small sitelock extension
    That's a good idea! A simple extension that does sitelocking well, something where you can specify a list of domains that it should work on.
    Cranktrain - Currently finishing a new game called The Cat Machine!
    @MattLuard on Twitter.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export ModuleUnicode Add-on
    Pharanygitis's Avatar
    Join Date
    Aug 2006
    Location
    Germany
    Posts
    1,037
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

Similar Threads

  1. Sitelock
    By bourroune in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th May 2013, 05:34 PM
  2. Finding specific strings or actions in the code - is there an easy way?
    By Yos in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th October 2012, 10:37 AM
  3. Sitelock (get object)
    By Evilized79 in forum SWF/Flash Export Module Version 2.0
    Replies: 15
    Last Post: 29th October 2010, 12:42 PM
  4. Help with sitelock!
    By Evilized79 in forum SWF/Flash Export Module Version 2.0
    Replies: 21
    Last Post: 13th October 2010, 06:18 PM
  5. specific animation has played a specific frame?
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 22nd April 2008, 04:34 PM

Posting Permissions

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