Dear RPG Maker Community,
I would like to write a function which kinda animates sprites by changing their opacity. So I guess I need 2 functions:
Sprite_Test.prototype.createSprite = function() {
var eyes1 = new Sprite(Bitmap.load('img/pictures/File0003.png'));
this.addChild(eyes1); }
and:
Sprite_Test.prototype.updateSprite = function() {
this.eyes1.opacity = 255;
wait(100);
this.eyes1.opacity = 0;
wait(100);
this.eyes1.opacity = 255; }
Like this, the update function doesn't work, always telling me that 'eyes1' is not defined???
I would like to write a function which kinda animates sprites by changing their opacity. So I guess I need 2 functions:
Sprite_Test.prototype.createSprite = function() {
var eyes1 = new Sprite(Bitmap.load('img/pictures/File0003.png'));
this.addChild(eyes1); }
and:
Sprite_Test.prototype.updateSprite = function() {
this.eyes1.opacity = 255;
wait(100);
this.eyes1.opacity = 0;
wait(100);
this.eyes1.opacity = 255; }
Like this, the update function doesn't work, always telling me that 'eyes1' is not defined???