Password upon entering Flash site

  • missshelby27
  • Novice
  • Novice
  • No Avatar
  • Joined: Dec 31, 2005
  • Posts: 21
  • Status: Offline

Post February 28th, 2008, 8:42 am

Hi,

Really hope someone can help! :0)

I've created a website in Flash and actually have script enabled to load the content of the site once the user has arrived. However I'd like to add a username and password that the user would have to enter before they could view anything so I can restrict people viewing the content unless I've given them access.

So I have two questions!

1) How do I add the username and password feature on arrival to the site

2) How do I keep the loading function going whilst they do this?

the code I have at the moment is:

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

Any help would be very much appreciated! :0)

Many thanks
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 28th, 2008, 8:42 am

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post February 28th, 2008, 1:50 pm

http://www.kirupa.com/developer/actionscript/authentication.htm
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • missshelby27
  • Novice
  • Novice
  • No Avatar
  • Joined: Dec 31, 2005
  • Posts: 21
  • Status: Offline

Post March 5th, 2008, 9:20 am

Thanks so much - I've managed to get the password all sorted now so that is great news! :0)

However I have another issue...

I have a preloader on frame 2 and the main movie on frame 4 using this code for the preloader:

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(4);
}


When there's no password or username login this works fine and when there's no preloader the login works fine, put them together and its not so good!

Frame 4 loads but the buttons stop working so it shows everything but nothing really works. Any ideas?!

Any help would be much appreciated!

Many thanks :0)
  • missshelby27
  • Novice
  • Novice
  • No Avatar
  • Joined: Dec 31, 2005
  • Posts: 21
  • Status: Offline

Post March 5th, 2008, 9:26 am

On second thoughts... it looks like its the login that is causing the issue. Whilst it works ok when it comes to playing the main movie it seems to have problems playing it properly, is there any reason why this would be?

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 42 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.