
Welcome Guest
|
#1
|
|||
|
|||
|
Understanding Class: Assigning to MC is easy. How to use for array?
Hello all. I apologize for the cryptic title of this post but am not sure how to ask.
Allow me to explain: 1. If I needed to create a package, class, constructor function/method that is executed with each instantiation of a movieclip that includes it's link to the class, I am cool. 2. I have four arrays. Each need to have their values shuffled. I developed code that does just that but instead of keying the same block of code over and over, I would like to just say arrayName.shuffle(); I am not sure how to parse an array (which is not an MC/sprite) through a class. This is what I am using to shuffle an array Actionscript:
while (ChooseFromCollections.length > 0)
{
var rw_randomNumbr:Number = Math.floor(Math.random()*ChooseFromCollections.length);
chosenCollections.push(ChooseFromCollections[rw_randomNumbr]);
ChooseFromCollections.splice(rw_randomNumbr,1);
trace(ChooseFromCollections);
}But if I was passing the array to the above with the udpated dynamic variables, how would I pass it to? It's an array not a movieclip. I would like to be able to add a new sprite to the stage and with that new sprite have it inherit a bunch of the functions and properties I will need. This is my worst post over. i am just very confused and my sleeping pill has kicked in. I hope maybe some of this makes sense. Thanks Rich
__________________
Enjoy my music for free http://www.FreaksArise.com Last edited by FlashMove : 05-17-2011 at 03:23 AM |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Linking symbol to custom class | skitzer | Flash CS3 / Flash 9 |
6 | 03-12-2010 02:20 PM |
| ways for movieclip inheriting class | Isekream | Actionscript 2.0 |
1 | 07-27-2006 02:00 AM |
| deleting Class resources | wesm | Flash MX 2004 |
1 | 01-31-2006 07:13 PM |
| Getting the class name/package at runtime | Scottae | Actionscript 2.0 |
3 | 01-26-2005 04:39 AM |
| as2 class questions | Solari | Flash MX 2004 |
7 | 10-11-2003 01:38 AM |





