|
Not that this is more complex then the first, one dimensional array, but its worth while digging into, so if you think your ready, lets get started.
Flash on the beach 2009 - Day 1 Flash on the beach 2009 - Day 1
Here is a more detailed form of our array: There are a few things that are interesting about the results. Notice that Tests 2 and 3 both return a 1, but 10 is a number in Test 2 but a string value in Test 3. The reason for that is because our contains function does not do type-checking. Our == operator in the for loop doesn't differentiate between a number and a string of the same number. // Credits: FlashGuru Array.prototype.copy=Array.prototype.slice; // test tester=[1,2,3,4]; tester2=tester.copy(); tester.pop(); trace (tester2); The following lines are of peculiar interest to us though: This tutorial will hold a basic introduction on three main points regarding arrays: (1) the creation of arrays, (2) accessing arrays, and finally (3) modifying arrays. This tutorial does not claim to tell you everything about arrays, but it will give you the required knowledge for you to start your own exploration on arrays in ActionScript. 18. AS3: Arrays
|
| w_w__w___._ja__va__2_s.c___o___m | Contact Us |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |