Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-26-2003, 07:09 PM   #1
swed
Registered User
 
Join Date: Sep 2002
Posts: 74
Default Virtual Creditcard/generate numbers

Hi!

I hope my friend "Eon" read this, my mathematic genie...

Here is my question

I have tried to make a virtual credit card (ice projector)

I want the 16 numbers to generate when the user start the card, different from each other.

When the number is generated I would like to store it in a txt.file (not a database) in some
Way, but the random generated numbers are the first thing to fix.

It would be nice if each number appears after itch other if it’s possibly

Have someone any idea to do that?

Thank swed


http://www.dynamisk.nu/testcard.htm
swed is offline   Reply With Quote
Old 05-26-2003, 07:43 PM   #2
retrotron
thinking is design
 
retrotron's Avatar
 
Join Date: Apr 2003
Location: UK
Posts: 1,292
Default

You could use Moock's function which generates a random number between two specified values:
ActionScript Code:
function myRandom(minVal,maxVal) { // returns randomNum in specified range     return minVal + Math.floor(Math.random() * (maxVal + 1 - minVal)); } // end myRandom() var creditCardNum = myRandom(1000000000000000,9999999999999999);
retrotron is offline   Reply With Quote
Old 05-26-2003, 07:48 PM   #3
swed
Registered User
 
Join Date: Sep 2002
Posts: 74
Default

Hi and thanks!

Could you get my file and put the code as it should be ?

Thanks
Swed
swed is offline   Reply With Quote
Old 05-26-2003, 07:56 PM   #4
retrotron
thinking is design
 
retrotron's Avatar
 
Join Date: Apr 2003
Location: UK
Posts: 1,292
Default

I'm not sure what you mean by get your file . . . (from where?) . . . but why not try it yourself first?
retrotron is offline   Reply With Quote
Old 05-26-2003, 08:05 PM   #5
swed
Registered User
 
Join Date: Sep 2002
Posts: 74
Default

From my link, but i will try myself to...

Regards
Swed
swed is offline   Reply With Quote
Old 05-26-2003, 08:11 PM   #6
retrotron
thinking is design
 
retrotron's Avatar
 
Join Date: Apr 2003
Location: UK
Posts: 1,292
Default

Ah, I see, you have a link for the .fla in your .htm link. I'm retarded.

Cool. Let me know if you can't get it to work.
retrotron is offline   Reply With Quote
Old 05-26-2003, 08:30 PM   #7
swed
Registered User
 
Join Date: Sep 2002
Posts: 74
Default

retarded ? i don´t think soo, you help me to find the script !

It would be cool to have each number spinning for a couple
of sek and then stop, but how ???

The next thing is to send this number to a storage file
( txt ) thats tricky i think, ASP? or what ?

Help on the way?

All hands in the air and the brains clear...

Swed
swed is offline   Reply With Quote
Old 05-26-2003, 08:37 PM   #8
Slowburn
[Invent:Design:Create]
 
Join Date: Sep 2002
Location: Toronto, ON
Posts: 1,959
Default

swed:

To save the .TXT file to the server you can use any backend or middleware you want....PHP, ASP, CGI, CF, etc...

But that is another topic in a different forum thread.
__________________
o Please do a search before you post
o Please use the [ as][ /as] tag for your code (so we can read it clearly)
Slowburn is offline   Reply With Quote
Old 05-26-2003, 08:53 PM   #9
swed
Registered User
 
Join Date: Sep 2002
Posts: 74
Default

Hi Slowburn!

So you mean that i should move this question to an
other Forum to get an answer ?!

I wonder if someone could show me the steps to
create such txt file and maybe the code...

But if you say this is not the Forum, huuuuu this looks
like the state of Sweden ( bigbrother )

Hi from
Swede
swed is offline   Reply With Quote
Old 05-26-2003, 08:58 PM   #10
Slowburn
[Invent:Design:Create]
 
Join Date: Sep 2002
Location: Toronto, ON
Posts: 1,959
Default

I would suggest asking this question in the scripting and backend section of this forum.

you can try to fgure it out by going to the source (http://www.php.net), or ask in the Scripting and Backend section.

It is a little more complicated for me to say here, since I'm not very good at PHP yet. but I'm suresomeone will be able to help you there.

Hope this helps.

Cheers.
__________________
o Please do a search before you post
o Please use the [ as][ /as] tag for your code (so we can read it clearly)
Slowburn is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:18 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.