10 comments found

nice file, love the clean design

Luisreyesdev

Thanks! Hope people find it useful :)

hi, i just bought the file… where do i edit the age for this?

Thanks

nevermind I got it… it is in the main

Luisreyesdev

2 ways, when you create an object on the code set the number like so:
newAgeVal = new AgeValidator(18);

or set the property “ageToMatch” to the number like:

newAgeVal. ageToMatch = 18;

Check out the documentation for more details, let me know if you run into any problems.

Thanks for your purchase!

im new to as3… how would i make this go to a url when validation is correct?

hmmm

i tried a bunch of things… went through the code and see nothing. I tried adding this var url:String = “home.html”; var request:URLRequest = new URLRequest(url); try { navigateToURL(request, “_self”); } catch (e:Error) { trace(“Error occurred!”); }

to the granted clip and it still wont work.. it opens this before it before validated…. please let me know.

Luisreyesdev

I can help set the urlrequest, even though it is a basic procedure. Please email through the profile page so we can continue conversation there. Thanks again.

email sent. thanks

Hello, I’m having a couple of issues and was hoping you could assist:

1.) I don’t use a Main.as file—I put code directly into the timeline. How can I go about adding this to the timeline withough using the Main.as file?

2.) In addition to the above, I want to skip the “Enter Site” page, and have it go straight to the age validator after clicking a pre-existing button I have already set up (ie. “Click to Watch Movie”). If I pass the age check, I want to proceed to the movie, otherwise, do nothing. Any help?

Overall, it looks great, and I’ll be overjoyed when I get it to work properly.

Nevermind—figured it all out.

1.) Movieclip it, and have the movieclip class linkage point to the .as file, then do a * MovieClip(root).gotoAndPlay(“label_name”); * to point to where I want it to go on the timeline

2.) Just needed to modify the button’s code in the .as file.

Hope that helps if someone runs into a similar issue in the future.

Luisreyesdev

Thanks, sorry I didn’t get to it in time!

No worries—thank you very much for creating this! 5/5

hi, would the age validator work on video player cause I have some video that are rated: Mature 18+

Luisreyesdev

The video player is not included with the download.

The validator class has a couple of listeners for valid age or not. You would need to call the validator function when the person triggers the video to play or open. Then set the video to play when the user inputs a valid age.

I hope this answers your question. :)

Default-user

thank, I’m going to see if I can try it a shot.

Hi – I would like this to open to a url request as well like doggy2223. Any help would be great. I just purchased this.

Luisreyesdev

On the Main.as file put this code towards the bottom, right after

"removeChild(newAgeVal);"

This Code:
var urlReq:URLRequest = new URLRequest("http://yoursite.com");
navigateToURL(urlReq,"_self");
And this at the top where the imports are at:
import flash.net.URLRequest;

by
by
by
by
by
by