Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

press a key, then press the same key

Status
Not open for further replies.

ferorsa

Programmer
Jun 5, 2002
6
DK
what i want to do is,

when i press a key the alpha of a movie clip changes to 50
and when i press the sam key again it changes back to 100

another thing is i cant "goto and stop" because there are other things happening along the timeline.
 
You need to add this to movie clip :

onClipEvent (enterFrame) {
if (Key.isDown(65)) { // here is where you add your key code
if (_alpha == 100) {
_alpha = 50;
} else {
_alpha = 100;
}
}
}

in this demo the KeyCode is 65 for 'a' Regards

Big Bad Dave

spider.gif


davidbyng@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top