Author Topic: Domain lock specific url  (Read 719 times)


  • Member
  • **
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Domain lock specific url
« on: Sun, Jun 5, 2011 »
I was trying out Flixel's built in domain locking recently (build 2.43) and found it very useful. However, there's a flash app I'm working on where I only want to to allow access to a specific webpage on the server, rather than a general domain (ex.

When I enter the URL into the loader, it never seems to work for me no matter what I do, such as omit or include the "http://", adding "index.html" after /secretarea, etc...

Any suggestions?


  • Active Member
  • ***
  • Posts: 205
  • Karma: +1/-0
    • View Profile
Re: Domain lock specific url
« Reply #1 on: Sun, Jun 5, 2011 »
I'm not sure how this works in 2.43, but in 2.5 the function checks if the specified domain is in the URL, rather than if it is the URL.

The quickest way to be to have a look at the flxpreloader code, and change it slightly.

In the constuctor of FlxPreloader, change

Code: [Select]
if(!FlxG.debug && (myURL != null) && (root.loaderInfo.url.indexOf(myURL) < 0))


Code: [Select]
if(!FlxG.debug && (myURL != null) && (root.loaderInfo.url == myURL)