hello again guys…
I have same problems with array(again)… i hope u could help me…
here’s the condition:
i’m duplicating movieclip as a button
when i release the current button*, I want it’s _visible = false;
and images(mc that has frame contain image).gotoAndStop*;
Other buttons, _visible = true;
code:
//duplicate movieclip(butThumb)
butThumb._visible = false;
for (i=1; i<=5; i++) {
butThumb.duplicateMovieClip(“butThumb”+i, i);
thisBut = this[“butThumb”+i];
if (i>1) {
thisBut._y = this[“butThumb”+(i-1)]._y+this[“butThumb”+(i-1)]._height+10;
}
/here’s the problem (I don’t know how to tell other butThumb except this butThumb that i’m pressing, _visible = true;)/
this["butThumb"+i].ii = i-1;
this["butThumb"+i].onRelease = function() {
this._visible = false;
images.gotoAndStop(i);
};
}
please help me guys:(
thank u…
system
March 12, 2003, 7:03pm
2
so quiet around here… where’s everybody…:cyclops:
system
March 12, 2003, 7:38pm
3
try to use
with(MCname) {
functions
}
system
March 12, 2003, 8:42pm
4
this[“butThumb”+i].ii = i-1;
I’m trying to help you out… but where is the .ii coming from?
system
March 12, 2003, 8:48pm
5
ok, nevermind… I dont think the domain of the question is even there… what I would do in the function is a loop
this["butThumb"+i].onRelease = function() {
this._visible = false;
images.gotoAndStop(i);
for (x = 1, x <=5, x++){
if (x != i){
this["butThumb"+x]._visible = true
}
}
}
the for loop says that everytime except when x is equal your current index, it should make the button visible…
does this help?
system
March 13, 2003, 2:58pm
6
sorry for the late reply…
thank u for the code,
i’ll inform the progress…i’m on it now…
system
March 13, 2003, 5:11pm
7
i’m done with the project…(deadline suck!)
but not the way I want it…
I’m startin this from zero again…
1st evaluation :
for lavaboy
PHP:--------------------------------------------------------------------------------
this[“butThumb”+i].onRelease = function() {
this._visible = false;
images.gotoAndStop(i);
for (x = 1, x <=5, x++){
if (x != i){
this["butThumb"+x]._visible = true
}
}
}
it’s not workin…
I attach my fla for u to see…
system
March 13, 2003, 7:49pm
8
this["butMain"+i].onRelease = function() {
for (x=1; x<=photoArray.length; x++) {
this._parent["butMain"+x]._visible = true;
}
this._visible = false;
}
??
system
March 14, 2003, 6:20am
9
it’s about time man… you’re always there to solve the problems…
where have u been??
can i put your link for the credits when my personal page is online???
(what is it?)
a question : this._parent, is it the same statement with _root. in this situation??
thank u so much … this is for my appreciation[SIZE=4]KAX THE SAVIOR …[/SIZE]
system
March 14, 2003, 6:24am
10
and by the way…
[COLOR=red][SIZE=4]Happy Belated Birthday !!![/SIZE][/COLOR]
system
March 14, 2003, 6:30am
11
it’s about time man… you’re always there to solve the problems…
where have u been??
i’ve been really drunk celabrating my past birthday
not kidding … it was my birthday march 7th
can i put your link for the credits when my personal page is online???
(what is it?)
nah … you don’t need to [size=1]besides i don’t have a site :P[/size]
a question : this._parent, is it the same statement with _root. in this situation??
yes … but i prefer _parent so you can place everything into a movie clip if needed and the script should still work
thank u so much … this is for my appreciation KAX THE SAVIOR …
no problem man =)
system
March 14, 2003, 6:32am
12
*Originally posted by indojepang *
**and by the way…
[COLOR=red][SIZE=4]Happy Belated Birthday !!![/SIZE][/COLOR] **
thanks =)
i really appreciate it
system
March 16, 2003, 6:22pm
13
for (x=1; x<=photoArray.length; x++) {
this._parent[“butMain”+x]._visible = true;
should be : photoArray.length+i
isn’t kax?..
next problemo…
the images(MC), u forgot to write it , if i only put this:
this[“butMain”+i].onRelease = function() {
[COLOR=red]images.gotoAndStop(i);[/COLOR]
for (x=1; x<=photoArray.length; x++) {
this._parent[“butMain”+x]._visible = true;
}
this._visible = false;
}
the images gotoAndStop the last frame on the MC…
system
March 16, 2003, 8:04pm
14
Ok, I am confused. I don’t see any problems after what Kax posted. And I don’t see anything on your stage besides the buttons (which are 1 frame), so what are you gotoAndPlaying?
The script there should work.
system
March 16, 2003, 8:08pm
15
Nevermind, I just tested it, I see what you mean.
system
March 16, 2003, 8:11pm
16
[AS]this[“butMain”+i].playVar = i;
this[“butMain”+i].onRelease = function() {
images.gotoAndStop(this.playVar);
for (x=1; x<=photoArray.length; x++) {
this._parent[“butMain”+x]._visible = true;
}
this._visible = false;
};[/AS]
fixed.
system
March 16, 2003, 8:30pm
19
WOWOW… THANK U VERY MUCH LOST!!! U’RE GREAT!! THANK’S
but what does (this[“butMain”+i].playVar = i;) means?
is it (this[“butMain”+i]) has another virtual clip??
(if this question make u laugh…well… that’s me…)
thank u for solving this Lost!! u’re throw away my headache…
system
March 16, 2003, 8:33pm
20
this[“butMain”+i].playVar = i
It creates a variable on your clip called playVar.
It sets the value of the variable to whatever value “i” is equal to at that time in the for loop.
We then call this variable (this.playVar since the variable is in that clip) in the onRelease of the this[“butMain”+i] clip.