Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Validate Phone Numer



Hi

I want to validate a phone number field!
i want to check if the field is empty! thats no problem, nut then i want it to check if its only digits!! ex. 734897520 is ok but 2389074y3 will return a error message!

if (phone == "") {
errFlag = true;
currErrorNum++;
currErrors[i] = String(errorMess[4]);
i++;
}
else {
if (phone.indexOf("") == -1){<here i want to check if its only digits!
errFlag = true;
currErrorNum++;
currErrors[i] = String(errorMess[4]);
i++;
}



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-25-2003, 12:20 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

What Is The Math Calculation To Inverse A Numer
i.e.
-200 becomes 200

-342 becomes 342

-999 becomes 999

i've been trying to work it out with a calculator but i just cant :P

A Question About Text, String And Numer.
Hey everybody! :-)

I'm having this weird problem that I have never come across...

I want the user to add a number so I can add another number to it
and get the final sum.
sounds simple, but here is the problem.

the user enters the number in a textfield, and I get the number like this:
code:
user_number = this._parent.sum.text;

the thing is the number in the text field is a String and not a number, so when I want to use the number and add to it another number
like so (lets say I want to add 5, just for the example):

code:
final_sum = user_number + 5;


(for the example the user_number=1)

than instead of getting in the final_sum the result 9,
I am getting 15 (it writes 5 next to the 1).

I do know that it happenes because the number in the text is a String, but how do I use it as a number ???


Thank!!! :-)

Array Data Being Viewed As Numer
How do I get flash to view my data in an arry as a number, not string text. My array is populated from an external file and when I try to compare its elements with a number it wont and returns NaN

Phone
Ok, I have had help from some people for coding a phone. They helped me out, and now I have something to where you punch in your phone. That works great, I just need to come up with a design for it.

This is what I was thinking:

I want to make like a flip phone to where the phone will flip open. How could I do this. My dad is a really good artist and could draw it for me, but what should I have him draw. The starting, and ending positions?

Well, any suggestions would be helpful.

Thanks!

Michael

Phone Help
Is there a place I can call to talk to FLash Experts who can give me help with a problem. I'd call Adobe but I only have a trial version of Flash so I can't talk to anyone over the phone.

My problem is that the stop action on the following fla is being ignored...

www.ela1.com/testjj/index.fla

Phone Dialer
How I make phone dialer in flash?
Hoe I send parameter to phone dialer in win2000 (phone numbers).
Thanks...

Phone Dialer
hey gyes plz help me out
i want do a phone diler like cellular phone
& it should dile numbers like this
"123-355-344-2345"
i.e after diling three times it should type dash(-)
so plz help me

Making A Phone, But............
Im trying to use a phone/keypad on as the navigation on my site. I would LOVE to be able to press the keys and see the coressponding number displayed in an LCD style box. ALSO can i do this and get the user to dial an extension to open various pages?
EG: dial 131 - numbers displayed in screen, click dial and they go to that page.
dial 136 - numbers displayed - click dial, they go to that page etc.

Can this be done? Can anyone help?
Any suggestions welome!

Yoda

Phone List
Hi there,

Can someone help me. I want to make a phone list that can be edited. So ppl must be able to putt in new numbers and names but must be able to delete some also.

I couldn't find any examples under the movies and i didn't found any tutorials for it eighter.

Thanks,


AmunRa

Phone Dialer
Hi - can anyone tell me how to create a phone dialer in flash mx?

For example 'click here to talk to us now' and the button would call 'us' and then the person calling.

Does that make sense?

Phone Formatter
Does anybody have idea how to make something like www.sprintvrs.com/ 's text input box (under dial area) where it automatically formats like this (###) ###-#### and adds ext on its own if needed. As well as changing letters to numbers instead.

Thanks in advance-

Bryce

Phone Formatting
I want to format a phone numer based on a RegEx pattern.
I got a sample code but that is a VB Script.

How can I use the same logic (given below) in ActionScript3.0.

'Create a regular expression object
Dim re
Set re = New RegExp

'Specify the pattern
re.Pattern = "(d{3})(d{3})(d{4})"

'Use the replace method to perform the formatting
Dim strFormattedPN
strFormattedPN = re.Replace(strUnformattedPN, "($1) $2-$3")

Phone Book?
hy,
i'm starting to develop a project wich is kind of a phone book, the support will be a CD-ROM. The users will have the change to type what they'r looking for... well this project is destinated to all kind of target! it will contain the contacts and some information about the local commerce! The information displayed should be all dymanic!
I don't know yet the way i should do this, i'm still searching, i wonder if there's anyone who can give me some advices, or indicate websites, tutorials....

thanks
best regards
Catarina

How To Get My Flash App On My Phone
I've been searching flash help files to figure out how I can get the flash lite application I've created onto my phone and so far I haven't found the answer. Is it safe to assume that I need to ask my wireless provider for the answer? (Verizon)

Thanks

Troy

Flash To The Phone
how do i get my images to play on my phone? the text goes over ok, but the swf. files do not. I have dreamweaver and flash. do i need something else? thanks.

New Phone Book
I am new user here.
You can create your Phone Book.
In the Phone Book You can save your Phone number and Name
and see your Previous Number and name.
You want to see this click here.
___________________________________________
Free Website for you.
Disk Space:350 MB.
Bandwidth :10 GB.
No Ads on your page.
and more.Click here.
___________________________________________

Phone Book Menu
Hi to all,

I want to develop a navigation system mobile phone. Like u can see the list of persons and scroll through the list with the help of scrolling buttons. U can see example at:

http://www.sonyericsson.com/T68i/shockwave/index.html

Any help will be appreciated. Is there any tutorial to do such type of task.

Thanks in advance
Shailendra

Phone Book Menu
Hi to all,

I want to develop a navigation system like a mobile phone. For example, u can see the list of persons and scroll through the list with the help of scrolling buttons. U can see example at:

http://www.sonyericsson.com/T68i/shockwave/index.html

Any help will be appreciated. Is there any tutorial to do such type of task.

Thanks in advance
Shailendra

Phone Number Validation
Howdy...

I need some help on validating the right form of the phone number...

I have most of the aspects validated and I got into some problems that I cannot solve myself...

1. I am using textfield.restrict = "0-9-"; to restrict the alphabetic characters entered to the text field, and it works fine when I publish the HTML and check it on the web. However, I cannot use any keys like Backspace or Delete keys to erase character within the Flash... Any way I can achieve both???

2. The final format of the phone number will be '123-456-7890'. I have a onEnterFrame handler that checks if the current character length is 3 or 7 to add '-' so that the user do not need to press '-' key... It works fine when I enter the number one by one, but, say, if I hold the '1' longer to get '111-111-1111', I get '111111111111' because it just took the advantage of onEnterFrame handler... Any help on this anybody???

I have attached the FLA file in case you need to take a look...

Thank you for your time...

Cell Phone Displays?
I was checking out the trial for Flash MX 2004 when I seen cellphone templates for certain phones? Do these templates mean that you can use a flash interface on your cellphone? Or is it something like backgrounds or that sort of stuff.

Extremely curious so please let me know. I could have the coolest cellphone in town.

Using AS To Convert Phone# To Add Hyphens
I'm wondering if this is possible. Say I have a form set up with a phone number field and I want to make sure that even if someone lets say types in 8885551212 it appears in the field and in the results as 888-555-1212. Is this possible using AS?

Cell Phone Txt Message?
this very well may be a stretch but can i send text messages to cell phones through flash?

Actionscript, Phone Code
i have a phone, and i have a dynamic txt box called "safe" i want when you press butten "1" a 1 appears in the text, like a phone. And when there is a 1, it will make it 12 when you press "2" i dont want it to quit. unless the press clear, any ideas?

Cell Phone Links
I know there is a way to make a cell dial a number that is in HTML or Flash. SO when the number is highlighted, you can select it and it will dial it for you.

Anyone know how?

Free Phone Calls
Hey fellow flashers.

I set up this VoIP site up recently and from £25 quid you can get completely free landline calls.

Its great for small business etc, you can get a free phone number too.

check it out http://www.i-voip.co.uk

Let me know what you think.

Much love

Stef150

Cell Phone Pictures
I have a flash movie that displays pictures, but I thought it would be really cool if you could click a button and have the picture sent to your cell phone.

Verizon wireless already does this with Flash on their vtext.com site, but I was wondering how difficult it would be to add it to my site.

Any advice is greatly appreciated, thanks!

Controlling With Phone Tone?
Is there a way to get flash to respond to specific sounds?

I'm wanting to create a game where you can control the movement of the sprite using the buttons on a regular touch tone phone. In theory it sounds relatively easy you just get flash to respond when it 'hears' a specific tone but I have no idea how to do this. Does anyone know if it's possible?

I'm a newbie when it comes to actionscript but I've had a bit experience with lingo back in the days of director 7!

Flash -> Mobile Phone
I want to develop an application that allows a person to create an image by dragging elements onto the stage and then send it to mobile phone (preferable animated) Is this at all possilbe and if so where can I find more info on how to do this and the technologies involved.

Cheers

Philippe

Web Site On A Cell Phone
Ok, my client wants a "phone-version" of his site. No problem, I have Flash CS3 and it came w/ some templates, etc...

The problem is:
Can Flash "snif" if we are accessing the site from a cell phone? Or we MUST give ppl a different url?

Thanks in advance.

Emulating A Cell Phone
Hi Im trying to get a tricky project off the ground.
One aspect of it is to simulate a keypad on a cell
phone (button movement not necessary). I need
to utilize variables from the keypad buttons in either
number or alphabet form using a short delay
between input to put names and numbers into
an address book (for instance 2 is either: 2 [or A,B
or C during a short time frame]. I'll also need to search
into the phone book (array) using two number
combinations from the keypad. The readout screen
will show a text box with the name or number, plus one
box above and below showing the contents before
and after.

Any tips or advice to help me out in any way would be
appreciated. Perhaps you know of a sample piece
I can learn from.

Moble Phone Site
I want to create a site that can be accessed by mobile phone devices I’m new to this media format and have some general questions.

Can I have a page on my current site that is set for this media outlet?

If a page is not possible can I have a sub domain on my site that is set up for this media outlet?

What are the perimeters for this type of page / web site IE image format limits and requirements?

Thanks in advance for any help you may have to offer.

FMS Cell Phone To Laptop
I've been doing Flash / Flex / Apollo for awhile now, but I want to develop an application where a cell phone can communicate directly with a laptop on a wireless card. Does anyone know if FMS is the way to go with this? I just downloaded it and am reading up on it... Just VERY new to THIS technology, not adobe in general.

HELP Mobile Phone Coding......
Im trying to create a replica mobile phone in flash, but i need help so that when you press the bttons come up on screen, the numbers follow each other. When i do it, they always replace the previous one. Any suggestions??

Phone Registrer And Notes
I was working on the calendar fla and got the idea of making, in the same fla, a field for the user to make notes and save it the same way the calendar does.
And also make a field to save names and phone number. The user can search for a name in a field beside it.
Is it possible to make those features the same way the calendar?

Phone Number And Zip Validation
Hey again,

Does anyone have any idea how to validate a US phone number and zip code?
Help apprectiated, as always

Create Games For Phone..
Is it possible to create a game in flash for a cellephone? If possible how? Also, how would I get it on my cellephone?

Experiment Internet Phone
hi guys today rogers cable came along and changed my phone line to a huge line that is the same as my tV!!>!>! the box has a ethernet cable and he said that is for future internet use i was just wondering if he is lying and i can acutally use it but it is just a higher speed they dont want us to know about u think so?

Flash On Moble Phone
Does anyone know what phones support the development of Flash programs on their phone?

I want to be able to create my own screensaver, interface, look and feel, etc.

I know the iPhone has an SDK, but I'm only looking to program in Flash or Flash lite.

HELP Mobile Phone Coding......
Im trying to create a replica mobile phone in flash, but i need help so that when you press the bttons come up on screen, the numbers follow each other. When i do it, they always replace the previous one. Any suggestions??

Phone Registrer And Notes
I was working on the calendar fla and got the idea of making, in the same fla, a field for the user to make notes and save it the same way the calendar does.
And also make a field to save names and phone number. The user can search for a name in a field beside it.
Is it possible to make those features the same way the calendar?

Phone Number And Zip Validation
Hey again,

Does anyone have any idea how to validate a US phone number and zip code?
Help apprectiated, as always

Flash Player For Phone
Hi, is it possible to get flash player for the sony ericsson k800i mobile phone?

if not, who can i contact to ask?

Regards,

Martin

Computing Help And Info:
http://www.webrevolt.biz

AS Textfield Validate
hi yall,
does anybody know the AS-syntax for asking an input-type-textfield if, for example, an email-adress is correctly spelled before submitting???
i´m not a programmer, but i successfully did this with javascript within a html-file:

if (document.KAUFANFRAGE.E_Mail.value.indexOf ('@',0) == -1 || document.KAUFANFRAGE.E_Mail.value.indexOf ('.',0) == -1){
alert("Bitte geben Sie eine gültige E-Mail-Adresse ein.

Zum Beispiel: IhrName@IhreDomain.de")
document.KAUFANFRAGE.E_Mail.select();
document.KAUFANFRAGE.E_Mail.focus();
return false;
}

and something like this in AS would really make me happy.
thanxalot dan

Validate E-mail
i'me pretty sure i saw this script for validating e-mail somewhere here at FK. can't find it now though!

anybody have a script like that, just to check that there an @ in the input field and it's followed by a "." etc.

thanks a lot!

Validate A Form
Hi,

I have been trying to make a sort of flash mx plugin for my swishmovie. It's a form that have the actions to posts the textboxes to a cgi script. It all works but I keep getting empty forms so I would like to validate some fields: like an e-mail has to have a "@" and a "." in it and another field may not be blank. So far no luck. I did some searching on this board but couldn't understand it at all cause i'm a real newbie.

This is what my submit button does:

on(press)
{

getURL ("http://users.scoutnet.nl/cgi-bin/mail-a-form.cgi", "nullframe", "POST");

GotoAndStop(2);
}

Where frame 2 is a 'thank you' message.

Any helps would be greately appriciated

Thanks!

Validate Combobox
Hello All,

I am using the MX components. How do you validate the value of a comboBox in a form. I have4 textboxes and 4 comboboxes. I want the user to select either 2 of the four comboboxes before the form can proceed to the the next part of the form on the next frame. In the validation code I have used the or || to no avail. Can anyone shed any light on this for me.

Thanks,

Justice

Validate Combobox
Hello All,

I am using the MX components. How do you validate the value of a comboBox in a form. I have4 textboxes and 4 comboboxes. I want the user to select either 2 of the four comboboxes before the form can proceed to the the next part of the form on the next frame. In the validation code I have used the or || to no avail. Can anyone shed any light on this for me.

Thanks,

Justice

Validate Text
How can i a validate a text box, so that if the (instancename.txt = 0) { then it would = to false;
else ; true

So what im triyn to do is validate the text box, so that it has some text or values in it otherwise an error would show up, if no tedxt is enter in the txt box

Validate Function
Im kinda new to functions so this may be a very stupid question. Everything works perfect when I have the following code
empID_txt.onKillFocus = function():Void{
if(empID_txt.length == 0){
idValidate_txt.text = "PLEASE ENTER YOUR EMPLOYEE ID";
}else if(empID_txt.length > 0){
idValidate_txt.text = "";
}
}


I would like to reuse this code without having to rewrite it everytime (thats why I thought you used functions in the first place) so I changed my code to
function validateID():Void
{
if(empID_txt.length == 0){
idValidate_txt.text = "PLEASE ENTER YOUR EMPLOYEE ID";
}else if(empID_txt.length > 0){
idValidate_txt.text = "";
}
}
empID_txt.onKillFocus = validateID();


now the idValidate_txt.text comes up PLEASE ENTER YOUR EMPLOYEE ID as soon as the movie starts and will not go away even if you fill out the empID_txt. I dont understand where I am going wrong.

Copyright © 2005-08 www.BigResource.com, All rights reserved