-
This is Ridiculous!!!!
For some reason or another the backspace and the delete keys don't work on the following function. But when I reassign the same function to a different key like the insert key it works perfect.
on (release, keyPress "<Backspace>") {
if (_root.calculator.display != "0") {
disstr = new String(_root.calculator.display);
if (disstr.length == 1) {
_root.calculator.display = "0";
} else {
_root.calculator.display = disstr.substr(0, disstr.length-1);
}
}
}
What is up with these keys.
Thanks
I can always use more help!
-
Senior Member
on (release, keyPress "") {
}
this give me an invalid key as "" is not a legal value.
Try...
on (release, keyPress "< Backspace >")
...or...
on (release, keyPress "< Delete > ")
without the spaces
Chris
http://www.**********-dms.com
-
When I copied it actually had "<backspace>" but for some reason that disappeared when I pasted it into my post. so it should have
on (release, keyPress "<backspace>") {
or
on (release, keyPress "<delete>") {
I can always use more help!
-
Freaky Flashkit removes in between if you have "< backspace >" without the spaces. Why is this?
that's how I had it "< backspace >" and or "< delete >" without the spaces
Last edited by Calculator; 06-19-2003 at 12:43 AM.
I can always use more help!
-
you could try using the key codes
ie:
Code:
onEnterFrame {
if(key.isDown(8)) {
CODE HERE
}
}
and the key code for delete is 46
-
That's exactly how I have overcome it.
But I wanted to know why it happened since in the original .fla that I modified it worked fine and then when I placed it into my .fla something happened to it and it's just the delete and backspace keys that don't work.
All I want to know is why!
Thanks for your help
I can always use more help!
-
Doesn't anybody know why!!!!
I can always use more help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|