Hi MM,
I think its better practice to define that regex in a variable and
switch on that variable.
HTH,
Sidney de Koning
On May 15, 2009, at 2:12 PM, Mendelsohn, Michael wrote:
Hi list...
Is it possible to use a regular expression as a case in a switch
statement? I've been searching
Thanks for responding Sidney. I think if I set a var prior to the switch, it
might not work because there are so many strings going into the switch. I'm
trying to optimize this that would apply to only some of all the cases:
switch(str){
case (W1) :
case (W2) :
case
That didn't work for me. :-/
- MM
Oke, i think you can, since it matches the input given with the case.
i didnt test it.
But cant you store the regex in a var and put that in the case?
like so:
var myRegEx:RegExp = /(W|M|K)\d/i;
var stringToMatch = ;
switch(stringToMatch) {
I haven't had to build ftp functionality in years. I hope someone is familiar
with the problem and can address this simply.
The class FileReference allows the user to browse to and select one file, and
the class FileReferenceList allows for the selection of multiple files. But
only
I haven't had to build ftp functionality in years. I hope someone is familiar
with the problem and can address this simply.
FileReference doesn't do FTP uploads, to the best of my knowledge,
only HTTP uploads.
The class FileReference allows the user to browse to and select one file, and
http://74.125.155.132/search?q=cache:Z9ZpwotYRtkJ:www.mikestead.co.uk/2009/01/04/upload-multiple-files-with-a-single-request-in-flash/+AS3+Socket+send+progress+brokencd=3hl=enct=clnkgl=usclient=firefox-a
On May 15, 2009, at 11:19 AM, Paul Freedman wrote:
I haven't had to build ftp
The file reference has an upload, the list is just an array of
fileReference Objects. You would step through your list uploading file
by file (better for handling errors vs. success than to just loop
them).
something like:
file = fileList[i]
file.upload(url)
B.
On Fri, May 15, 2009 at 11:19 AM,
I've searched for polygon draw classes and functions, but I can't find
anything that can do rounded corner polygons. Anyone on the list come
across or written a decent set of code that can?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
Hi all,
I need to make an AS3 version this:
http://www.w3schools.com/ajax/ajax_example_suggest.asp
I'm thinking I'll query the database for all of the users store that
in an array or xml and then attach a listener to the textfield that
will search the array everytime a character is added
This is very odd request. With switch... case, its only useful if you
have the same condition expression. Your regex example is a similar
expression, but no where the same. No I think you better off with
if...else in this matter.
___
Flashcoders mailing
10 matches
Mail list logo