| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jun 2001
Posts: 247
|
Description
Any custom method added to the Array Class. Rules Standard Rules Format ActionScript Code:
If you don't have a .swf or .fla, paste an example of it being used. The example doesn't count towards the line limit. The person with the best method gets a cookie. * *To recieve prize winner must be between the ages of 93 to 106 years old. Please allow 12 years for delivery. |
|
|
|
|
|
#2 |
|
Oops I did it again
Join Date: Oct 2001
Location: Melbourne
Posts: 8,578
|
OK I don't know how useful this is or if its been done before (or even if you can do it with a built in method) but here goes
ActionScript Code:
just extends the splice method a bit. Seems to me that removing 1 item from an array is pretty common and that's what this prototype does cheers
__________________
Billy Online Galleries Free Flash Video Tutorials Photo Website Template Don't email or PM me questions... |
|
|
|
|
|
|
|
|
#3 |
|
Addicted To FLASH
|
ok, here is mine
basicly this to return a random value of an array so u can use it to pick the Array elements randomly ActionScript Code:
ActionScript Code:
__________________
â€* GOD Is Near â€* Questions Don't PM for Questions An eye for an eye, make the whole world blind _____________________________________________GHANDI Last edited by farafiro; 05-20-2003 at 07:24 AM.. |
|
|
|
|
|
#4 |
|
CONTEMPLATING LIFE
|
findPos
done a million times b4 but here you go ActionScript Code:
__________________
~bugged I am looking for freelance work imageWeaver gallery microsite direct download play here microgame (unfinshed, also give it a while to load) game |
|
|
|
|
|
#5 |
|
Oops I did it again
Join Date: Oct 2001
Location: Melbourne
Posts: 8,578
|
I think we need one from the challenge starter...
__________________
Billy Online Galleries Free Flash Video Tutorials Photo Website Template Don't email or PM me questions... |
|
|
|
|
|
#6 | |
|
Addicted To FLASH
|
Quote:
yep, I think we do
__________________
â€* GOD Is Near â€* Questions Don't PM for Questions An eye for an eye, make the whole world blind _____________________________________________GHANDI |
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Jun 2001
Posts: 247
|
OK here ya go.
I'm not exactly happy with it. It seems like there would be a good way without duplicating the array. ActionScript Code:
|
|
|
|
|
|
#8 |
|
Registered User
Join Date: Feb 2003
Location: Florida
Posts: 289
|
hate to say this, but you can do that much easier with the built in splice() method.
array1 = new Array("remington","winchester","glock","colt"); trace(array1); array1.splice(2, 0, "browning"); trace(array1); |
|
|
|
|
|
#9 | |
|
Registered User
Join Date: Jun 2001
Posts: 247
|
Quote:
That is much better. thanks. |
|
|
|
|
|
|
#10 |
|
Registered User
|
ActionScript Code:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| loading an object from an array | NateVeronica | ActionScript 2.0 | 1 | 03-30-2004 11:53 PM |