Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: Array resizing... |
| From: | Nathan Dicken |
| Date: | Thu, 13 Jan 2000 14:31:13 GMT |
Miles,
This is definitely possible and can get complicated pretty easy. In this
case, you want to access a value in the list (array) that is only 1
character long. If you wanted to access "AB" or "DE" and then resize the
list it would just take some changes to the code below...
In this example, there's two scripts that are called using the "Call"
statement. The first one I labeled "create list" and the second is labeled
"access list". They could look like these...
"create list"
Set Variable: "list" = "ABCDEFG"
Trace ("original list: " & list)
Trace ("-------------------------")
"access list"
Set Variable: "listCount" = length(list)
Set Variable: "listChoice" = random(listCount) + 1
Set Variable: "listChoiceValue" = subString(list, listChoice, 1)
Trace ("value "&listChoice&" in list "&list&" = "&listChoiceValue)
Trace ("now you can use "& listChoiceValue &" any way you need...")
Set Variable: "listPrior" = subString(list, 1, listChoice-1)
Set Variable: "listRemainder" = subString(list, listChoice+1,
listCount-listChoice)
Trace ("values in list before: "& listPrior &" / values in list after: "&
listRemainder)
Set Variable: "list" = listPrior & listRemainder
Trace ("current list: "& list)
Trace ("-------------------------")
The first thing would be to call the "create list" script where you can
create the list any way you'd like - through a loop or directly like above.
Accessing the list could be done through a two-frame loop that could look
like this first frame:
If (list ne "")
Call ("access list")
Play
Else
Go to and Stop ("done using this list")
End If
Hope this helps...
Nathan
--------------------------------------
Nathan Dicken
Fusionary Media
http://www.fusionary.com
>Anyone have some code to delete entries from a 1 dimensional array?
>
>I can build the array and set/get values from it, but I can't resize it
>(delete entries from it) after it's built.
>
>What I'd like to be able to do is take an array of ABCDE and delete entries
>C and E from it leaving ABD.
>
>TIA for assistance.
>
>Ciao,
>
>m i l e s
>_______________________________________________________________________
>
>m i l e s l i G h T w O o d
>_______________________________________________________________________
> m i l e s G T O @ p o b o x . c o m
>_______________________________________________________________________
>multimedia development: director lingo shockwave java +1 213.353.9850
>
>
>
>
>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 help
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 help
Replies
Re: FLASH: Array resizing..., m i l e s l i g h t w o
Replies
FLASH: Array resizing..., m i l e s l i g h t w o
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

