Ok so, I have a button called btnEnter and its instance name is enter. Then, I have a movie clip called mcRotatingDot and its instance name is center. These two work so that when the mouse is over the button, the dot blinks. When the mouse is no longer over the button there is a fade in from alpha 0 to 60 of the dot. It all works fine, here is the code that I am using on the movie clip:
onClipEvent (load) {
//this sets the initial properties of our clip
this._xscale = 75;
this._yscale = 75;
this._x = 400;
this._y = 350;
this._alpha = 60;
}
onClipEvent (enterFrame) {
//this if statement is what causes the fade in
if(end == true)
{
if(this._alpha <= 60){
this._alpha += this._alpha + 2;
}
}
/*
this checks the state of the button for roll over, if so it goes back and plays the movie clip which fades the dot in and out. It also sets end = false for the fade in effect
*/
_root.enter.onRollOver = function() {
_root.center.gotoAndPlay(2);
end = false;
}
/*
this checks the state of the button for roll out, if so then it comes to a stop on the movie clip, thus no more blinking. Then, it sets the dots alpha to 0 and end to true for the fade in effect
*/
_root.enter.onRollOut = function() {
_root.center.gotoAndStop(1);
_root.center._alpha = 0;
end = true;
}
}
1)How can I make the movie clip blink with pure action script? And not having to do a stupid tween on the movie clip’s timeline.
2)Can a button activate more than one movie clip? Because I am also trying to make the same button (aka. btnEnter, instance name enter) to change the rotation speed of another movie clip to spin faster. Here is the code for the other movie clip called mcRotatingCircle instance name outter:
onClipEvent (load) {
//this sets the initial properties of our clip
this._xscale = 1000;
this._yscale = 1000;
this._x = 400;
this._y = 350;
this._rotation = 70;
this._alpha = 30;
}
onClipEvent (enterFrame)
{
//here it spins at 3 degrees per frame
this._rotation += 3;
//here is the rollover state, which should cause it to
//spin at 55 degrees per frame.
_root.enter.onRollOver = function() {
_root.outter._rotation += 55;
}
}
Yet the movie clip will not spin faster on roll over. The only thing that I thought could go wrong is that there is another instance of the same movie clip mcRotatingCircle, named middle on the stage. I tried absolute addressing the outter instance, but it just won’t work.
Please Help… is driving me insane.
Ps: Sorry for the stupidity of the question, but I am just getting into Actionscript.