Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Trim

Trim

2004-03-13       - By Simon Lord

 Back
Reply:     1     2     3     4     5     6  

Ok, I put the crack pipe down.  I got it.  :)



On Mar 13, 2004, at 8:40 PM, Simon Lord wrote:

> Thanks Jayson.  I poked at it and I'm a little stumped.  The example  
> in the manual works fine, the trace output exactly what I wanted.  So  
> I applied it to my code and it's being completely ignored.  I've been  
> staring at it for 20 mins now and don't see anything wrong, it should  
> work.
>
> <snip>
>
> var z = 0;
> var outputArray = new Array();
> //
> while (z<userList.length) {
>   outputArray =  
> userList[z]+"..........................................................
> .."+"\n";
>   // This is where I was hoping to trim the string to a specific length
>   my_str = new String( outputArray );
>   my_str.slice( 0, 50 );
>   //
>   _global.listResult += my_str;
>   z++;
> }
>
> </snip>
>
> ... There is no difference between the results I get from this code  
> and my prior code which did not attempt to "slice* the string.  I can  
> even set it to drop the first 10 characters in my string but it gets  
> ignored.  So:
>
> my_str.slice( 10, 50 );
>
> ... has no affect on the output.  Something is obviously wrong with  
> the code, having it work from the sample but not in my "do while" is  
> putting a damper on my evening.
>
> Help?
>
>
>
>
> On Mar 13, 2004, at 7:50 PM, Jayson K Hanes wrote:
>
>> Look at the examples in the help for:
>> String.slice()
>> String.substring()
>> String.substr()
>>
>> They all should do what you need easily!
>>
>> -Jayson
>>
>>> -- --Original Message-- --
>>> From: Simon Lord [mailto:slord@(protected)]
>>> Sent: Saturday, March 13, 2004 7:43 PM
>>> To: flashcoders@(protected)
>>> Subject: [Flashcoders] Trim
>>>
>>> How can I trim a sting down to a specific number of characters?  The
>>> word "trim" doesn't even come up in a search in the AS manual. :P
>>>
>>> Sincerely,
>>> Simon
>>
>>
>> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>> -
>> Supported by Fig Leaf Software
>> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>> -
>> Be sure to check the archives and the wiki:
>>  http://chattyfig.figleaf.com/
>> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>> -
>> http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106852
>> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
>> -
>> To unsubscribe send a blank e-mail to:
>> Normal Mode: flashcoders-unsubscribe@(protected)
>> Digest Mode: flashcoders-digest-unsubscrive@(protected)
>>
>>
> Sincerely,
> Simon
>
>
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Supported by Fig Leaf Software
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> Be sure to check the archives and the wiki:
> http://chattyfig.figleaf.com/
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106854
> =-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
> To unsubscribe send a blank e-mail to:Normal Mode:  
> flashcoders-unsubscribe@(protected)
> Digest Mode: flashcoders-digest-unsubscrive@(protected)
>
>
Sincerely,
Simon


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:106857
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)