PDA

View Full Version : see my test site/give me help


bep
05-31-2001, 07:58 PM
hey everybody.
I need a bit of help trying to manipulate a movie's actions just how I want them...
first off, you can check out what I'm doing at:

http://www.wn.net/testsite.html

If you click on the "home" or "software" buttons, four boxes come up, and if you then click on one of the four buttons next to a box, it enlarges the box. Click again and the box shrinks.
However, I would like it if, when I click on a box and then click on another box, the first automatically shrinks before the second one opens...

Can anyone help me with this?
Thanks,
Brian

Jesse
06-04-2001, 10:18 AM
that all depends on how you're increasing and shrinkign your items. I'm assuming they are just standard animations though so I would do this:

each time you enlarge one set a variable:

box1Enlarged = true

then each time you go to enlarge another run a loop which checks if box1 through box4 enlarged == true and if so, plays the shrink animation... delaying it so it shrinks BEFORE the clicked one opens would be harder...

bep
06-04-2001, 09:00 PM
Cheers, Jesse~

Now that I've got that working, was wondering about a way to condense the script...

on (press) {
if (_root.homexx1.bigbox == true) {
}
with (_root.homexx1) {
gotoAndStop(1);
}
if (_root.homexx3.bigbox == true) {
}
with (_root.homexx3) {
gotoAndStop(1);
}
if (_root.homexx4.bigbox == true) {
}
with (_root.homexx4) {
gotoAndStop(1);
}
}

//each condition needn't be exclusive to the object it is referring to...I mean, if any of these booleans == true, then all of the objects can take the statement gotoAndStop(1);
Whaddya think?
Brian

Jesse
06-05-2001, 01:43 AM
for (j=1; j<5; j++) {
if (_root["homexx"+j].bigbox == true) {
with (_root["homexx"+j]) {
gotoAndStop(1);
}
}
}

?

bep
06-05-2001, 07:34 PM
I hope I'm not a pain, but this new code isn't working for me...
I plugged it in like this:

on (press) {
for (j=1; j<5; j++) {
if (_root["homexx"+j].bigbox == true) {
with (_root["homexx"+j]) {
gotoAndStop(1);
}
}
}
}

Right now, nothing happens on press. I want to sort this out: does j++ include all increments from what j equals up to the < limit? If so, how does it know to exclude the operative homexx# like in my long code?
I don't think that is the main problem anyway, because the symptom would be all the boxes immediately resetting to frame 1 on press, which isn't happening.
It seems I'm not fluent enough (yet) to solve this one alone.
Any other suggestions?
Brian

Jesse
06-06-2001, 02:07 AM
read the scripted loops tutorial to see waht it does and how. you might be better off jsut doing it manually, I didn't notice you wanted to exclude some stuff.