ralba1998
01-03-2003, 09:34 PM
I am duplicating a movie with ..
rowDivide = 550/10;
for (i =0; i < 4; i++) {
duplicateMovieClip(_root.fillCat.theCategory, "mc" + i,i);
clipName = _root.fillcat["mc" + i];
trace(clipName+ "\n");
if (i == 0) {
_root.fillcat["mc" + i].category = newName;
setProperty(_root.fillcat["mc" + i], _x, _root.fillCat.theCategory._x);
clipname.onMouseDown = function() {
trace(clipname+".onpress");
trace("this button works");
}
}else{
newCoord = rowDivide * i;
setProperty(clipName, _x, _root.fillCat.theCategory_x);
clipName.category = newName;
clipName.counter = clipName._x;
clipName.limiter = clipname.counter + newCoord;
//trace(clipName.counter);
clipName.onEnterFrame = function() {//used to slide animate
if (this.counter < this.limiter) {
this.counter= this.counter + 10;
this._x = this._x + 10;
//trace (this._x);
} else {
delete this.onEnterFrame;
}
};
clipname.onMouseDown = function() {
trace(clipname+".onpress");
trace("this button works");
}
}
for some reason .. all the buttons that appear have the same value.. is not the i on duplicate movie clip supposed to change the level?
what can I do to make them all independent values?
What am I doing wrong? I read up on levels and duplicate movies a million times and read all the post I can and I am still frillin confused.
here is what I get on output for all the buttons..
_level0.fillCat.mc3
Thanks..
Ray
rowDivide = 550/10;
for (i =0; i < 4; i++) {
duplicateMovieClip(_root.fillCat.theCategory, "mc" + i,i);
clipName = _root.fillcat["mc" + i];
trace(clipName+ "\n");
if (i == 0) {
_root.fillcat["mc" + i].category = newName;
setProperty(_root.fillcat["mc" + i], _x, _root.fillCat.theCategory._x);
clipname.onMouseDown = function() {
trace(clipname+".onpress");
trace("this button works");
}
}else{
newCoord = rowDivide * i;
setProperty(clipName, _x, _root.fillCat.theCategory_x);
clipName.category = newName;
clipName.counter = clipName._x;
clipName.limiter = clipname.counter + newCoord;
//trace(clipName.counter);
clipName.onEnterFrame = function() {//used to slide animate
if (this.counter < this.limiter) {
this.counter= this.counter + 10;
this._x = this._x + 10;
//trace (this._x);
} else {
delete this.onEnterFrame;
}
};
clipname.onMouseDown = function() {
trace(clipname+".onpress");
trace("this button works");
}
}
for some reason .. all the buttons that appear have the same value.. is not the i on duplicate movie clip supposed to change the level?
what can I do to make them all independent values?
What am I doing wrong? I read up on levels and duplicate movies a million times and read all the post I can and I am still frillin confused.
here is what I get on output for all the buttons..
_level0.fillCat.mc3
Thanks..
Ray