Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-27-2005, 11:50 PM   #1
Registered User
Join Date: Jan 2005
Posts: 2
Default Random Number cycling


i want my effect to cycle through numbers until it hits the right one, like so:
(the numbers 36987 should appear) * = random number


etc until it reaches the correct numbers.

But of course being the actionscript n00b that i am, i have no idea how to do so.

Also, is there a way i could make it search more numbers or do something in general to slow the process down?

Any help would be greatly appreciated.
BGTwitch is offline   Reply With Quote
Old 01-28-2005, 03:29 PM   #2
Xeef's Avatar
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539

hi and welcome to As.Org

ActionScript Code:
Secret = "abc123ABCxyz456XYZ890"; _root.createTextField("Secret_txt", 1, 100, 100, 0, 0); Secret_txt.autoSize = true; Secret_txt.text = Secret; _root.createTextField("Search_txt", 2, 100, 150, 0, 0); Search_txt.autoSize = true; //Search_txt.text = Secret; Count = 0; Curent = ""; onEnterFrame = function () {     RandomChar = chr(random(75)+48);     Search_txt.text = Curent+RandomChar;     if (Secret.charAt(Count) == RandomChar) {         Curent += RandomChar;         Count++;     }     if (Curent == Secret) {         delete onEnterFrame;     } };

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 01-28-2005, 08:03 PM   #3
Registered User
Join Date: Jan 2005
Posts: 2

BGTwitch is offline   Reply With Quote

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:52 PM.

Follow actionscriptorg on Twitter


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