Kod: Zaznacz cały
ten_mc.onPress = function(){
tamten_mc._alpha+=10;
tamten_mc._alpha=30;
}
Myslalem ze linijka "tamten_mc._alpha+=10; "
mowi o predkosci alphy, ale bez wzgledu na to czy dam 1 czy 100
jest wciaz tak samo! Gdzie popelniam blad?
Kod: Zaznacz cały
ten_mc.onPress = function(){
tamten_mc._alpha+=10;
tamten_mc._alpha=30;
}
Kod: Zaznacz cały
this.createEmptyMovieClip("my_mc", 1000);
my_mc._x = 100;
my_mc._y = 100;
my_mc.lineStyle(60, 0x000000, 100);
my_mc.lineTo(1, 0);
//
var speed = 5;
my_mc.onEnterFrame = function() {
if ((this._alpha -= speed) <= 0 || this._alpha >= 100) {
speed *= -1;
}
};Kod: Zaznacz cały
var speed = 5;
ten_mc.onPress = function() {
tamten_mc.onEnterFrame = function() {
if ((this._alpha -= speed) <= 0) {
delete this.onEnterFrame;
}
};
};Kod: Zaznacz cały
var speed = 5;
tamten_mc._alpha = 0
ten_mc.onPress = function() {
tamten_mc.onEnterFrame = function() {
if ((this._alpha += speed) >= 50) {
delete this.onEnterFrame;
}
};
};