| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Dec 2005
Posts: 3
|
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?! |
|
|
|
|
|
#2 |
|
actionscripting fool v2.0
Join Date: Jun 2005
Location: Germany
Posts: 218
|
one way to do it:
Code:
newDig = "";
for(i = 0; i < digit.length-1; i++) {
newDig = digit.charAt(i);
}
digit = newDig;
|
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Dec 2005
Posts: 3
|
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Code for creating ComboBox | Danneman | Components | 2 | 07-26-2005 02:10 PM |
| Creating Quiz using Learning Interactions | Kbarek | Components | 0 | 01-19-2005 05:41 PM |
| mobile application | leooi | FlashLite / Portable Devices Development | 2 | 12-13-2004 08:40 AM |
| Help me build your dream cell phone! | moskovich | General Chat | 5 | 05-18-2003 12:35 PM |
| Phone Menu | shailu123 | ActionScript 1.0 (and below) | 1 | 08-07-2002 07:52 AM |