Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 12th, 2004, 08:04 PM
camcim camcim is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Location: Melbourne, Australia
Posts: 290 camcim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 43 m 46 sec
Reputation Power: 7
Storing arrays

Hi all,
I am having a tough time finding a solution for this.
Lets say i have a randomly generated number.
eg.
Code:
q = Number(random(50))+1;

On another frame i have a loop.
eg.
Code:
loop = Number(loop)+1;
score = score-0;
gotoAndPlay(1);

Within this frame i want to store the values of "q" in an array, for example:
Code:
new_q = 2,23,12,14,8 etc.

The loop only lasts 10 times so i would need to store just 10.
Any ideas on how i should do this?
Regards,
camcim

Reply With Quote
  #2  
Old January 13th, 2004, 11:03 AM
Tann San Tann San is offline
Gotta get to the next screen..
Click here for more information.
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,457 Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Tann San User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 6414 Folding Title: Novice Folder
Time spent in forums: 2 Weeks 6 Days 5 h 46 m 34 sec
Reputation Power: 503
Facebook MySpace
Hi, I've been playing with arrays lately.

randArray = new Array();
randArray.push(Number(random(50))+1);

You will want to create the array outside of the loop so that you are not re-creating it each time.

Array.push()
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Storing arrays


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway