Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

password generator is faulty

Explorer ,
Apr 30, 2018 Apr 30, 2018

hi i used a password generator from a website flashkit.com, the code is as follows, but kicks out different variable ranging from 1 then 2 then 3 then 1 and is not constantly kicking out seven , can someone help me to change it please.

function newPassword(){

    var totalChar = 7; // number of chars in the password

    var salt = "abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789";  // salt to select chars from

    var saltLength=salt.length;

    var userPass=""; // set the inital variable

    for (var xx=0;xx<totalChar;xx++){  // loop and create password

        userPass+=salt.charAt(Math.floor(Math.random()*saltLength));

    }

    return userPass;

}

button1.onRelease=function(){

    fred.text=newPassword();

}

TOPICS
ActionScript
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2018 Apr 30, 2018

Hi.

It always generates a password with 7 chars for me.

Please double-check if your text field is big enough to display 7 chars.

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

hi i increase the size and put the border off, and still doesnt,grab1.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

this above is a picture with the border on.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2018 Apr 30, 2018

Here is a sample:

flash_cs6_as2_generate_password.zip - Google Drive

I hope it helps.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

you ill give it look at now.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

i just looked and downloaded it, im using adobe 5.5, and the file wont open up cause its created in adobe 6.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2018 Apr 30, 2018
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

thank you ill give it a look at now.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

grab2.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

sorry i think i might have adobe cs5

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

yip i checked it im on cs 5grab3.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2018 Apr 30, 2018
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

thank you ill give it a look at.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018

It works 100% thank you. ive never used a radio button before and am wanting to know does it differ in script from a regular button ?

such as a_btn.onRelease = function(){

does a radio function use onRelease ?? if its instance name is a_btn what is the code that can be used on a radio button before the = function(){ ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 30, 2018 Apr 30, 2018

That's great!

Here is a reference that may help you:

Flash CS4 Professional ActionScript 2.0

If you Google "as2 radio button" you'll find many resources on this subject.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2018 Apr 30, 2018
LATEST

thank you very much.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines