
February 7th, 2004, 02:34 PM
|
 |
Contributing User
|
|
Join Date: Feb 2003
Location: Orlando, FL
Posts: 177
Time spent in forums: 5 h 18 m 12 sec
Reputation Power: 6
|
|
You can use conditional statements within onEnterFrame to react when either an instance name or variable of x has changed to 4. The example below checks an instance name of x within the first keyframe. When x is changed to 4 via a button release, the movie reacts by going to another keyframe. You can configure it to do pretty much anything.
Code:
_root.createTextField("x", 1, 0, 0, 0, 0);
x._visible = 0;
this.onEnterFrame = function() {
if (x.text == 4) {
_root.gotoAndStop("2");
}
};
stop();
Put this inside your button:
Code:
on (release) {
x.text = 4;
}
Last edited by jmichels : February 7th, 2004 at 02:37 PM.
|