-
buttons and keyboard
can i activate buttons with a keyboard? howto if yes? i guess it can be done with actionscript, but i really need expert help on this one...
And out of the darkness the zombie did call,
True pain and suffering he brought to them all.
Away ran the children to hide in their beds,
For fear that the devil would chop off their heads.
-
you can do it from the button actions pane, the resulting code os stoping the movie on both key press, and pressing the "s" on the keyboard is like this.
on (release, keyPress "s") {
stop();
}
if you allready have inserted actions to a button it wouldn't be a problem.
Next time tell us what version of flash you use to provide a solution for that version, i don't know if the menus are different in the other versions of flash but it helps anyway.
I did it with flash mx
hope it helps.
-
i'm using mx2004
thanks, i'll try it, if i don't manage it, i'll let you know..
And out of the darkness the zombie did call,
True pain and suffering he brought to them all.
Away ran the children to hide in their beds,
For fear that the devil would chop off their heads.
-
nah, didn't help.
i added the script, but i was awarded with absolutely nothing. it works, when i click, but won't respond to keyboard.
what i did find in scripts, under components for button was something onkeydown, but it looks like this when i add this action:
instanceName.addEventListener("keyDown", );
looks too confusing to me...
why the hell did they change action script in this new version??? they changed absolutely everything, i can't find things, i was so used to the old one, in mx and especially flash 5...
And out of the darkness the zombie did call,
True pain and suffering he brought to them all.
Away ran the children to hide in their beds,
For fear that the devil would chop off their heads.
-
i agree wiv u there!
I wasnt exactly a pro but i cud do basically ANYTHING in flash 5.
I recently came 2 2004MXPro and evrything is just....
BLARRG
U cant find anything...
look on the bright side........ you have got alot further than i have!!!
jag
-
OK....so....I'm a pig...
try this...
Not exactly the same scenario...but....
I have a button that I want to work when I click it or when the user hits the enter key. The button then changes a variable and sends the user to a specific key frame. Here is the code:
on(release, keyPress "<Enter>"){
_root.menudisplay = "";
gotoAndPlay(_root.PageForward);
}
Works like a charm. I am using MX 2004 so hopefull this will help you.
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
|