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!

how to use varibles

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

 
The best thing I can think of is to create a movie clip with 1 layer and two keyframes. Put a STOP action in both frames.
In the first key frame, create a button with the following actions attached:

on (keyPress "a") {
setProperty (_root.yourmovie, _alpha, "50");
}
on (release) {
gotoAndStop (2);
}

In the second frame, create another button (or use the same one) with the following actions on it:

on (keyPress "a") {
setProperty (_root.yourmovie, _alpha, "100");
}
on (release) {
gotoAndStop (1);
}

Then just drag the movie clip somewhere where it can't be seen.

Rgds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top