PDA

View Full Version : creating mobile phone


cjpike
12-04-2005, 02:27 PM
Hi there,

I am a beginner to ActionScript and I have made a Flash mobile phone, with a addDigit function, which adds a digit to the display of the phone, which has a variable name display. The thing is i want a piece of ActionScript to delete one number at a time from the screen like what happens when you press the 'C' button (or similar) on your mobile phone. I have a button for this on my phone so a on (release) method would work i think.

Here is the addDigit code:

function AddDigit(digit)
{
// Add a digit to the display
if (display == "") {
display = digit;
} else {
display = display + digit;
}
}

Any help on this would be appreciated

Cheers,
Chris

* Also is there an easy way to have a call timer counting up in a text box when i press the call button on my phone and to stop when i press the end call button?!

seeFresh
12-04-2005, 03:14 PM
one way to do it:

newDig = "";

for(i = 0; i < digit.length-1; i++) {

newDig = digit.charAt(i);

}

digit = newDig;

cjpike
12-04-2005, 11:03 PM
Thanks for the help but how do i actually use this code?! I am a beginner, will this go in my 'c' button code in the on (release) function?

Thanks again,
Chris