Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flash General Questions > Other Flash General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-17-2002, 04:38 PM   #1
xmental
Registered User
 
Join Date: Oct 2001
Posts: 40
Default Simple stuff, but for some reason I can't make it work

Hi, here's the situation:

_root.nav = MC Navigation for site
_root.nav.one = MC with a button
_root.nav.two = Second MC with a button
_root.nav.three = Third MC with a button
each of the Buttons has a changing variable "pos" that is set to either 1 for "first position" or 2 for "second position"


code on MC 1 button.

on (release) {
if (_parent.two.pos >= 2 ) {
_parent.two.gotoAndPlay (11);
}
this.gotoAndPlay (11);
}

Basically if the pos variable of _root.nav.two is set at 2 I want it to play the 11th frame of _root.nav.two as well as play the 11th frame of _root.nav.one. If the pos of _root.nav.two is equal to 1 I don't want it to do anything except play the 11th frame of this MC.

I don't think this made any sense to me, hopefully someone will see the error of my ways


x
xmental is offline   Reply With Quote
Old 01-17-2002, 04:56 PM   #2
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,330
Default

It looks okay to me. What happens when you press the button? Are you sure "pos" holds the value you think it does? Have you tried running the debugger?

-PiXELWiT
http://www.pixelwit.com
pixelwit is offline   Reply With Quote
Old 01-17-2002, 05:13 PM   #3
xmental
Registered User
 
Join Date: Oct 2001
Posts: 40
Default

Yeah pos is holding the proper values at the right times, but for some reason even if pos is = 1 it still moves MC two.

I am so utterly perplexed by this thing.
xmental is offline   Reply With Quote
Old 01-17-2002, 05:41 PM   #4
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,330
Default

If you post your file, I'll take a look and see what I can do.

-PiXELWiT
http://www.pixelwit.com
pixelwit is offline   Reply With Quote
Old 01-17-2002, 05:46 PM   #5
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,330
Default

Just for giggles, try this:
Code:
on (release) { 
trace (_parent.two.pos);
_parent.two.pos=1;
trace (_parent.two.pos);
if (_parent.two.pos >= 2 ) { 
_parent.two.gotoAndPlay (11); 
} 
this.gotoAndPlay (11); 
}
Let me know what happens,

-PiXELWiT
http://www.pixelwit.com
pixelwit is offline   Reply With Quote
Old 01-17-2002, 05:52 PM   #6
xmental
Registered User
 
Join Date: Oct 2001
Posts: 40
Default

It's fixed, this is how:

on (release) {
gotoAndPlay (11);
if (_parent.two.pos >= 2) {
_parent.two.gotoAndPlay (11);
}
}


Anyone know why the order of the commands made the difference?



x
xmental is offline   Reply With Quote
Old 01-17-2002, 07:04 PM   #7
pixelwit
village halfwit
 
pixelwit's Avatar
 
Join Date: Jul 2001
Location: USA, PA
Posts: 3,330
Default

Did you happen to try using the code I provided with the trace functions? If so, what showed up in the output window?

-PiXELWiT
http://www.pixelwit.com
pixelwit is offline   Reply With Quote
Old 01-18-2002, 12:56 PM   #8
xmental
Registered User
 
Join Date: Oct 2001
Posts: 40
Default

No I didn't bother, I just changed the order of the code and that seemed to work.

Later

x
xmental 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
one template, many looks? subquark ActionScript 1.0 (and below) 1166 10-29-2013 06:18 PM
PLZ HELP! attach or duplicate WONT work with this preloaded stuff Hofmann ActionScript 2.0 13 08-23-2004 10:04 PM
LoadVars() - Why so impossible to make work mrand01 Server-Side Scripting 6 07-15-2003 12:13 PM
How to make buttons work in movie clips? supernova0219 Other Flash General Questions 4 08-06-2002 10:26 AM
Can't make mailform script work... hccfilms Server-Side Scripting 5 11-16-2001 08:25 AM


All times are GMT. The time now is 03:44 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.