-
duplicatemovie
i have done som lines of code that duplicates a movie (with a :"for x" ( in this one there are dynamic texts and button behaviour...)
i want all of them NOT to appear in one time...
how can i do this?
-
k, this is what you do. in your loop type this in:
count = count + 1;
duplicateMovieClip("object", object + count, count);
setProperty(object + count, _x, random(550));
setProperty(object + count, _y, random(400));
remove = count - 1
removeMovieClip(remove);
that should do it.
P.S: "object" is the name of what ever clip you're duplicating
-
sorry.... i wasn't clear enough ...
here's the code:
there's only one movieclip called IT, in this one there's a movieclip called "me" and a button without name
b = 15; // buttons number
style = new TextFormat();
style.bold = true;
style.color = 0xeeeeee;
style.font = "arial";
style.size = 9;
//
for (x=1; x<b; x++) {
// duplicate movies containing a button
duplicateMovieClip(it, "it"+x, x);
_root["it"+x]._x = 500-(30*x);
// create textfield inside the movie
_root["it"+x].me.createTextField("txt", x, -12, -10, 30, 20);
_root["it"+x].me.txt.selectable = false;
//what will be displayed
if (x>=10) {
_root["it"+x].me.txt.text = "[0"+x+"]";
} else {
_root["it"+x].me.txt.text = "[00"+x+"]";
}
// setup the style o'textfield
_root["it"+x].me.txt.setTextFormat(_root.style);
// assign actions
_root["it"+x]["instance"+(x+1)].onPress = function() {
name = (this._name);
filename = name+".jpg";
trace("filename :"+filename);
};
_root["it"+x]["instance"+(x+1)].onrollover = function() {
this._alpha = 0;
};
_root["it"+x]["instance"+(x+1)].onrollout = function() {
this._alpha = 30;
};
}
so this code creates buttons, put some text in it and assign them actions.
i need those buttons to appear one after the others...
i could put a layer above with a masked graphic but i want this to be 100% dynamic
Last edited by dOP3; 02-22-2003 at 03:49 AM.
-
ok ... found a way ...
thx anyway =^)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|