Forum Topic: Movie protection Actionscript

(171 views • 3 replies)

This topic is 1 page long.

<< < > >>
None

SkullRocker

Reply To Post Reply & Quote

Posted at: 9/7/05 10:53 PM

SkullRocker EVIL LEVEL 07

Sign-Up: 01/21/05

Posts: 125

i was looking over this tutorial , under the movie protection section, and it explains how to make your movie only viewable on newgrounds. it says the actionscript for it is:

checkurl=(new String( _root._url ).slice( 0, 25 ));
if (checkurl=="http://uploads.ungrounded"){
block.gotoAndStop(1);
}else{
block.gotoAndStop(2);
}

but lets say i want to put my animation on my site, brocolli.com (i just made it up, so dont try it). then the tutorial suggests that the AS should be:

checkurl=(new String( _root._url ).slice( 0, 23 ));
if (checkurl=="http://www.brocolli.com"){
block.gotoAndStop(1);
}else{
block.gotoAndStop(2);
}

would it really be that simple? just 'if (checkurl=="http://www.brocolli.com"){' ? what if when you click on the link to open the animation, it opens a different link, lets says i opens brocolli.com/anim2. then would i have to change the part in the AS to 'if (checkurl=="http://www.brocolli.com/anim2"
){' ? if i kept it as just 'if (checkurl=="http://www.brocolli.com"){', would it still work because it just check the first 23 characters becasue i set the number on 'slice' as 23?


None

Llammalrdsofsci

Reply To Post Reply & Quote

Posted at: 9/7/05 11:35 PM

Llammalrdsofsci EVIL LEVEL 11

Sign-Up: 09/06/03

Posts: 273

im not one for actionscripting, but that seems like it'd work just www.brocoli.com


None

ShotInTheHead

Reply To Post Reply & Quote

Posted at: 9/7/05 11:38 PM

ShotInTheHead LIGHT LEVEL 31

Sign-Up: 12/20/02

Posts: 3,449

it would work as long as its correctly trimmed. doing so means that it doesnt look at anything that trimmed off, becuase its trimmed off.


None

BleeBlap

Reply To Post Reply & Quote

Posted at: 9/7/05 11:40 PM

BleeBlap LIGHT LEVEL 24

Sign-Up: 03/08/05

Posts: 945

At 9/7/05 10:53 PM, SkullRocker wrote: would it really be that simple?

Yep, you would only be checking the first 23 characters which would be the same for http://www.brocolli.com/ and http://www.brocolli.../crazyAnimation.html
or even http://www.brocolii...sion.php?id=10383028

. No need to change your code for each animation you publish (assuming you keep uploading it to brocolli.com of course.)


All times are Eastern Standard Time (GMT -5) | Current Time: 11:13 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!