Flasher Archive

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


Subject: RE: FLASH: array trouble
From: Ruben Mafura
Date: Wed, 20 Dec 2000 16:50:47 GMT

RuupY = HappY

Thanks Helen!

-----Original Message-----
From: Helen Triolo [designerati-technica [dot] com (mailto:designerati-technica [dot] com)]
Sent: Wednesday, December 20, 2000 4:12 PM
To: flasheratchinwag [dot] com
Subject: Re: FLASH: array trouble


RuupY,

You could make this easier with a text file with these contents:

soundpress=12034,13501,etc

and then after you do LoadVariables on the text file (and make sure the
variable has loaded by adding a 2-frame loop to cycle until soundpress
ne ""), you'll have a string variable named soundpress, which you can
turn into an array with:

aSounds = soundpress.split(",");

To reference an element of the array, you'd just use
aSounds[thiselement] (which will be something like 13501). Does that
give you what you need?

Regards,
Helen
-----------------------------------------------------
i-Technica http://i-technica.com 301.424.6037
developer resources: http://i-technica.com/whitestuff

Ruben Mafura wrote:
>
> ...the txt-file contains the following (and much more of it):
>
> soundpress0=12034&soundpress2=13501&soundpress3=.......etc.etc(up to
> soundpress899).
>
> I just need the values of the variables, not the variablenames.
>
> About your suggestion...
> Can you give an example of "putting the strings into the array reference
> them directly from the array"?
>
> GreetZ
> RuupY
>
> (PS 'De mensen, de oplossingen',...it's Dutch, it stand for 'The people,
the
> solutions'. My boss thought of that one,...next year a number of small
Flash
> projects will be comming this way and (curious as i am) i'm sort of
peeking
> into this Flash-world. Right now, composing music and graphical design is
my
> thing. Perhaps that Flash will join these fields of interest. The things
> i've seen so fare, build in Flash look very promising.)
>
> -----Original Message-----
> From: Helen Triolo [designerati-technica [dot] com (mailto:designerati-technica [dot] com)]
> Sent: Wednesday, December 20, 2000 3:25 PM
> To: flasheratchinwag [dot] com
> Subject: Re: FLASH: array trouble
>
> Not quite clear here. Yes, a loop is a good idea for putting things in
> an array, and an array is a good idea if you have 900 things with
> similar names! But do you want the array to contain both variable names
> and strings? Can't you just put the strings into the array and
> reference them from the array directly? Also, what's the content of
> your text file? Hard to answer (from my point of view, anyway) without
> knowing more.
>
> (PS What's "De mensen, de oplossingen"?)
>
> Regards,
> Helen
> -----------------------------------------------------
> i-Technica http://i-technica.com 301.424.6037
> developer resources: http://i-technica.com/whitestuff
>
> Ruben Mafura wrote:
> >
> > >From a novice in Flash, a question concerning arrays.
> >
> > Can anybody help me out with directly filling an array with values from
an
> > external txt?
> >
> > 1) a 'loadvariable' to place the variables with their values inside a
> > movieclip
> > 2) create an array
> > 2) I've got about 900 values to place in the array so i thought a loop
> would
> > be smart thing to use. Point is that i can't get the loop to work. The
> name
> > of the variable from which i want to place the value in the array needs
to
> > be comprised from 2 parts:
> >
> > a part that doesn't change and a number that increases (up to 899).
> >
> > e.g. "SoundPress" + 899 to form variable-name 'SoundPress899'
> > which contains a value
> > "SoundPress" + 899 will form a string and not a name of a variable.
> That's
> > where my problem resides.
> >
> > I hope i've explained my problem in clear way and i hope evne more that
> > someone can help me out.
> >
> > Regards.
> > RuupY
> >
> > Pecoma ICT-groep * De mensen, de oplossingen * http://www.pecoma.nl

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save 200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Pecoma ICT-groep * De mensen, de oplossingen * http://www.pecoma.nl

Is deze e-mail niet voor u bedoeld? Laat het ons even weten. Bij voorbaat dank.
Dit e-mailbericht is gecontroleerd op computervirussen met MIMEsweeper.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save 200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


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