You could also use the reverse method which reverse's the order of your
array:

myArray.reverse();

and then loop through it like you normally would. Six of one, half-dozen
of the other.

Scott
-----------------------------------
http://blog.socttgmorgan.com



------------------------------------------------------------------------
-

Date: Fri, 01 Dec 2006 09:04:31 -0500
From: "Merrill, Jason" <[EMAIL PROTECTED]>
Subject: RE: [Flashcoders] xml thumbnail gallery reverse order problem
To: Flashcoders mailing list <[email protected]>
Message-ID:
        
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii

>>i'm kind of a noob, so there is probably a really simple solution i'm
>>overlooking.  i was thinking: how would one reverse the order in which
>>flash is processing/placing the thumbs?  or maybe instead of using my
>>script, there's some kind of for loop that might work?  

Note that a loop like this:

        for(var i=0; i<Array.length; i++){
        }

Will go through "forward" through the array.  However, a loop like this:

        for(var i in Array){
        }

Will do the exact same thing, only backwards through the array.  Take
this for example - paste this into a frame script and run it:

        myArray = [2,43,200,4776,0,68];

        for(var i=0; i<myArray.length; i++){
                trace("position: "+i+" value: "+myArray[i])
        }

        trace("==============")

        for(var i in myArray){
                trace("position: "+i+" value: "+myArray[i])
        }

Note in your code where you are calling this:  function thumbnails_fn(k)
- At a quick glance I could finds the function definition, but not where
you called it from - I'm lazy - you posted a lot of code to mull over.
But I suspect the value of k is going down, not up - check into the way
you are calling it.  

>>for some reason flash does things in reverse order 

Flash only does what you tell it to do. :)  

Hope that's useful to you.

Jason Merrill
Bank of America 
Learning & Organizational Effectiveness
 
 
 




The information contained in this message is confidential. It is intended to be 
read only by the individual or entity named above or their designee. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any distribution of this message, in any form, is strictly prohibited. If 
you have received this message in error, please immediately notify the sender 
and delete or destroy any copy of this message.

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to