Machsupport Forum
Mach Discussion => Mach Screens => Flash Screens => Topic started by: azambuja on October 15, 2008, 11:06:08 AM
-
Hello friends!!!
I need to count the numbers of letters of a _root.something (exemple: String="something" to get Number=9, or something like that) and with this number I can use it in a If condition.
Thanks for your supply.
Azambuja
-
Try:
mystring = "something"
X = LEN(mystring)
X should be 9.
You might be able to just do:
X = LEN("something")
-
Hey man!!
Thanks but it does not work. Maybe I am not using it in the right way.
Azambuja
-
Is it case sensitive? Try Len and not LEN? That's the VBA function. Maybe the script function is different. I'll have to check the docs.
-
I think he meant in Flash and not VB
This will return the number of your strings length:
MyString.length
this will check to see if the digits are 9:
if (MyString.length == 9) {
trace("Is 9");
} else {
trace("Is not 9 it is:"+ MyString.length);
}
.....but you can take the code they gave for VB and run it in flash but you have to do it like this and I dont belive you can split and join in Mach's VB
fscommand("VBMacro" "some VB here")
-
Oops, didn't see that it was in the Flash section. :)
Thanks Jason
-
NP :)
-
Thanks Zealous!!
That worked. Now I can continue to work.
Azambuja