ForumsProgramming ForumActions Script help...

6 2905
forgottongaurdian
offline
forgottongaurdian
42 posts
Nomad

Hi all,

I need help with passwords in flash (of course) anyways i want to know how you would set the scripting to set up a password.

Like. I have the text box where they can type and its set to a password box. i have the button set to goto the next frame. but i need to know how when you type in a password incorectly into the box the button won't let them through and when you have in correct it lets you through to the next frame.

  • 6 Replies
LonLonRanch
offline
LonLonRanch
172 posts
Nomad

Well once you've stored you're text field into a variable say myPass you have to make a small check when you press the 'submit' button, or however you plan on doing that. This is what you would do:

submitBtn.onRelease = function(){
if( myPass == &quotassword&quot{
gotoAndStop("accepted"
}else{
gotoAndStop("denied"
}
}


For this to work you have to have a button with the instance name of submitBtn and frames with the names "accepted" and "denied".
Change this line :if( myPass == &quotassword&quot{ to have whatever you want you're password to be

forgottongaurdian
offline
forgottongaurdian
42 posts
Nomad

ummm this is what it says in the output panel..

**Error** Scene=Loading, layer=Password, frame=1:Line 1: Statement must appear within on handler
submitBtn.onRelease = function(){

Total ActionScript Errors: 1 Reported Errors: 1

forgottongaurdian
offline
forgottongaurdian
42 posts
Nomad

nevermind now it works now

oh and how would i get a clock that goes by real time into flash???

LonLonRanch
offline
LonLonRanch
172 posts
Nomad

I've never made a clock myself but I would assume this would be how.

forgottongaurdian
offline
forgottongaurdian
42 posts
Nomad

thanks for the link but would you know how to put it into Flash 8?

forgottongaurdian
offline
forgottongaurdian
42 posts
Nomad

hey i was browsing through google on how to make a clock in flash 8 and i found this link... (digital clock)

IT'S A VIDEO TUTORIAL.

Link>> http://www.flashvista.com/details/item/2998/

Showing 1-6 of 6