fradal
07-29-2008, 03:25 PM
Hello,
I'm new to this forum and I'd like to thank you for all the information that I've found here!
It's really useful!
I've got a problem with the script below..
I need to move the movieclip tn1 from position 600(x) 1(y) to position 1 1.
I've tried to use the onenterframe event, but it doesn't seem to work and I cannot understand why :(
This is the script:
var tn1:MovieClip = this.createEmptyMovieClip("tn1", getNextHighestDepth());
tn1.loadMovie("1.jpg");
tn1._x = 600;
tn1._y = 1;
tn1.onEnterFrame = function() {
if(this._x == 1) {
delete this.onEnterFrame;
} else {
this._x -= 1;
}
}
Can you please help me figuring out where the error is?
Thank you
Francesco
I'm new to this forum and I'd like to thank you for all the information that I've found here!
It's really useful!
I've got a problem with the script below..
I need to move the movieclip tn1 from position 600(x) 1(y) to position 1 1.
I've tried to use the onenterframe event, but it doesn't seem to work and I cannot understand why :(
This is the script:
var tn1:MovieClip = this.createEmptyMovieClip("tn1", getNextHighestDepth());
tn1.loadMovie("1.jpg");
tn1._x = 600;
tn1._y = 1;
tn1.onEnterFrame = function() {
if(this._x == 1) {
delete this.onEnterFrame;
} else {
this._x -= 1;
}
}
Can you please help me figuring out where the error is?
Thank you
Francesco