Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 05-31-2001, 07:58 PM   #1
bep
Registered User
 
Join Date: Apr 2001
Posts: 33
Default

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
bep is offline   Reply With Quote
Old 06-04-2001, 10:18 AM   #2
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

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...
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 06-04-2001, 09:00 PM   #3
bep
Registered User
 
Join Date: Apr 2001
Posts: 33
Default

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
bep is offline   Reply With Quote
Old 06-05-2001, 01:43 AM   #4
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

Code:
for (j=1; j<5; j++) {
    if (_root["homexx"+j].bigbox == true) {
        with (_root["homexx"+j]) {
            gotoAndStop(1);
        }
    }
}
?
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 06-05-2001, 07:34 PM   #5
bep
Registered User
 
Join Date: Apr 2001
Posts: 33
Default

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
bep is offline   Reply With Quote
Old 06-06-2001, 02:07 AM   #6
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

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.
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hit Test Walls Kelna Simple Stuff (Newbies) 2 02-27-2005 08:22 PM
Test Movie vs. Test Scene happy_smiles 23 ActionScript 2.0 1 10-12-2004 04:59 PM
Test Scene Different than Test Movie teamhonda22 ActionScript 1.0 (and below) 4 08-13-2004 06:23 PM
Has anyone taken the Macromedia Flash MX 2004 Developer Certification test? sosuke General Chat 9 07-13-2004 07:53 PM
test for string split into an array = done? Jessica lucidiastudios ActionScript 1.0 (and below) 10 05-07-2003 09:31 PM


All times are GMT. The time now is 05:41 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.