Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Sorting numbers using variables
From: John Croteau
Date: Tue, 9 Nov 1999 13:33:34 GMT

Hi Waldo,

> news1=19991101
> news2=19991102
> news3=19991031
> news4=19991201

> I want some variables, like sortedNews or something like that,
> that point towards the unsorted variables.

> sortedNews1=news3
> sortedNews2=news1
> sortedNews3=news2
> sortedNews4=news4

> That's because i've got some variables linked to news&i that use the same i
> to match for example a newsitem.
> No matter how to approach them.
> I hope i've been clear. Who knows the answer?
What you want to do is create an index. Branden's code does a sort.
An index stores the order in a separate array (column) without changing
the actual data. In Flash each array or column of an array is a separate
set of related variables.

The big big problem with your code is it is way over complicated.
The 8 digit date sequence shown is created just for ease of sorting or
indexing since you can order by using the complete number and the result
will be in date order. There is no need to separate the year, month and
day to do the sort (or indexing) routine just treat the whole string as
a single number. In Flash you don't even need to convert it to a number.

This date setup only works for dates from the year 1 to the year 9999
:-)
It is important to maintian the 4 - 2 - 2 arrangement and include the
required placeholding zeros when the date string is compiled. i.e.
February 4, 866 would be 08660204. Unfortunately, most of these routines
are not made to be Year 10K compliant.

--
Coming Soon Flash 4 Web Animation F/X and Design
http://www.amazon.com/exec/obidos/ASIN/1576105555/flashcentral
----------- -----------------------
John Croteau croteauaterols [dot] com (mailto:croteauaterols [dot] com)
------------- -------------------------
FlashTek (Advanced Websites with Flash) http://www.FlashTek.com/
Flash Bible (Fast track to good Flash) http://www.FlashBible.com/
Flash Central(The Universe Starts Here) http://www.FlashCentral.com/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  RE: FLASH: Sorting numbers using variabl, Waldo Smeets

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]