[as3] Implementing y8 api?

hi, I need help

some problems I face when implementing the api:

  1. get browser page url. this is to determine whether more games button is visible or not. I tried many method to get it work, but it just doesn’t
  2. Y8 Protection class. I put it inside my game, but ankit said it still
    doesn’t work

Please HELP asap.

regards

-edit-
one more thing, I already put this script in event handleIDNET

if( idnet.type == 'protection'){
    if(idnet._protection.isBlacklisted()){
        // Show movie clip and disable game
    }
}

do I also have to put his?

if( idnet.type == 'protection'){
    if(idnet._protection.isSponsor()){
        // **what should I do here??**
    }
}

Hi, the best thing to do for the sponsor data is to save it to a variable. This way the game can check it any time a button is clicked. It will return Boolean true/false.

var isSponsor = idnet._protection.isSponsor();

For isBlacklisted, it’s better to stop the game right as the data comes in. so you can call a function or put the code where ever it is needed. The following is an example.

if(idnet._protection.isBlacklisted()){
    timeline.stop();
    blacklistMessage.visible = true;
}

hmm… rather hard to test.
I do something like this to test.

var isSponsor:Boolean;

and inside event handleIDNET I put

if( idnet.type == 'protection'){
   isSponsor = idnet._protection.isSponsor();
   trace("protection is loaded")
   log.text="protection is loaded"
}

but it doesn’t seem to work. log.text still empty. no matter how long I wait.

can you give an example on how to use the ‘protection’ type?

Hi,

To test, use this private upload. http://upload.id.net/

Also, make sure you have enabled protection in the init call. The last argument should be set to true.

idnet.init(stage, appID, '', verbose, showPreloader, protection);
Y8 Games