Flasher Archive

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


Subject: Re: FLASH: string functions?
From: olga
Date: Thu, 18 Jan 2001 23:32:37 GMT

This is what the MCs call on stopDrag:

if (me._droptarget == "/area" && area != 1) {
myVar = me._name;
_root.StoryItems.push(_root[myVar]);
;
area = "1";
with (_root) {
gotoAndPlay (2);
}
} else if (me._droptarget != "/area") {
area = "0";
x = "0";
do {
current = _root.StoryItems[x].toString();
base = (_root[myVar]);
if (base == current) {
_root.StoryItems.splice(x, 1);
}
x = Number(x)+1;
} while (x<_root.storyItems.length);
}
with (_root) {
gotoAndPlay (2);
}


(frame 2 of _root contains:
_root.volume = _root.StoryItems.toString();
_root.volume = _root.removeCharacter(",", _root.volume);
)


----- Original Message -----
From: "Scott Rouse" <sfrouseatevermore88 [dot] com>
To: <flasheratchinwag [dot] com>
Sent: Thursday, January 18, 2001 2:53 PM
Subject: Re: FLASH: string functions?


> I would look at how you first generate that string. I don't see anything
> about how you are generating it, but I think your problems would be solved
> by simply creating an array instead of a long string then use...
>
> yourArray.join (" ");
>
> this will output all the elements of the array with a space between them
and
> it should tax the processor much less...
>
> I have no clue as to how you are generating the string, however...
>
> hth,
> Scott
> www.onlineexhibit.net
>
>
> ----- Original Message -----
> From: <olgaattwitchy [dot] com>
> To: <flasheratchinwag [dot] com>
> Sent: Thursday, January 18, 2001 4:08 PM
> Subject: Re: FLASH: string functions?
>
>
> > This works wonderfully-- the only problem is that this is an event that
> > updates often, and it's bogging down the movie A LOT.
> >
> > What is happening:: user drags mc unto an area. mc triggers addition of
> > item into an array. array prints into a text file (it reads like a
story,
> > so the commas are removed).
> >
> > Every time I drop the mc unto the target area the whole movie freezes
for
> a
> > second.
> >
> > Is there a less processor intensive (fast?) way of doing this?
> >
> > Thanks so much!!
> > Olga
> >
> > ----- Original Message -----
> > From: "Phillip Kerman" <flash5atteleport [dot] com>
> > To: <flasheratchinwag [dot] com>
> > Sent: Thursday, January 18, 2001 1:31 PM
> > Subject: RE: FLASH: string functions?
> >
> >
> > > I don't know if this is the easiest... but it's one way I use in my
> > upcoming
> > > book "ActionScripting in Flash":
> > >
> > > function removeCharacter (whatChar,fromString) {
> > > var charFound=1
> > >
> > > while (true) {
> > >
> > > charFound = fromString.indexOf(whatChar);
> > > if (charFound == -1) {
> > > return fromString;
> > > }
> > > fromString
> =fromString.substr(0,charFound)+fromString.substr(charFound+1);
> > >
> > > }
> > > }
> > >
> > >
> > > // to use removeCharacter(",","the,string,with commas"));
> > >
> > > > -----Original Message-----
> > > > From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of
> > > > olgaattwitchy [dot] com
> > > > Sent: Thursday, January 18, 2001 1:04 PM
> > > > To: flasheratchinwag [dot] com
> > > > Subject: FLASH: string functions?
> > > >
> > > >
> > > > What's the easiest way to remove a repeated character from a string?
> > > >
> > > > I have a string with repeating commas that I need to extract:
> > > >
> > > > "the dog, is blue, on saturdays, and sundays."
> > > >
> > > > to:" the dog is blue on saturdays and sundays."
> > > >
> > > > Thanks!!
> > > > Olga
> > > >
> > > >
> >
> > >
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 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
>
>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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


Replies
  RE: FLASH: string functions?, Phillip Kerman
  Re: FLASH: string functions?, olga
  Re: FLASH: string functions?, Scott Rouse

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