Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if statement problems

Status
Not open for further replies.

netchen

Technical User
Apr 19, 2005
21
AU
hi!

i've been working on an application where i use a variable to get to a specific part of the application. now the name "fullservice" is nested within two different parts - in the mc_navigation_services movieclip (that is where the button calls the action to open the file nested in another movieclip). the text i have is nested within two other movieclips (all not on the main timeline). it all happens in frame 4 of the main timeline but if i call frame 4 and then say _root the specific frame in the movieclip it stops at frame 4 of the main timeline and does not play the other movieclips. the code looks something like this:

if(gotolinki == undefined)
{
trace("gotolinki ist undefined");

}
else
{
if(gotolinki =="fullservice")
{
_root.gotoAndPlay(4);
_root.mc_navigation_services.gotoAndPlay(2);
_root.container.products_cont_intern.gotoAndPlay(2);

how can i make all 3 parts play? i am really, really stuck and it would be great if someone could help!

thanks lots!
}
 
Some confusion in the info provided...

If your 2 targeted movie clips are not present on stage on the same frame as your button, the calls will simply be ignored.
Must I assumed that your "mc_navigation_services", and your "container" and "products_cont_intern" are only present on the main timeline's frame 4 (or from frame 4 on)?
Furthermore, is the "products_cont_intern" if nested in the "container" clip, present on the first frame of this container clip?

Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
sorry, i did write it a bit confusing ;-)

ok: the code is on frame 2 (after the preloader bit) of the main timeline. what it does is that if i want to go to a specific part of the application straight in the internet browser i write:

(that is the use of setting the gotolink variable on that specific website i am working on)

now, i do not have a button that activates it, as soon as i enter that address it links to the specific part of the .swf movie.

it all works fine for the parts of the navigation that exist on the main timeline. but as soon as my navigation has sub menues that aren't directly on the main timeline (the mc_navigation_services movieclip where the buttons of the sub menues are nested) and the movieclip products_cont_intern that is nested in the container movieclip(in frame 1) and all together sits on frame 4 of the main timeline.

i am totally confused - and i am sorry for my bad english, it all does sound much more confusing than it probably is...
 
i'll try again ;-)

the main navigation buttons are on different frames on the main timeline. thats why for example it works with the section scan that is located on frame 3 of the main timeline the code is the same as above but only using

_root.gotoAndStop(3);

using the variable as gotolink=scan in the if statement.

on frame 4 of the main timeline there is the section services which has 3 sub menus - one of them is called fullservice. so there is a movieclip on frame 4 that is called mc_navigation_services - that consists of the 3 sub menu buttons that tell what to do when you click on them. so the code for the button fullservice is:

on(press, dragOver, dragOut){

gotoAndStop(2);
_parent.scroller_services._visible = 1;
_parent.container.services_cont_intern.gotoAndStop(2);
_parent.container._y = -1;
}

it tells various movieclips to play when clicked.

then i have a mask layer that masks the container where the text sits for each sub menu (it has a scroller so i only want the specific part to be seen.) thats again on the main timeline.

within the movieclip mc_container_services on frame one there is another movieclip called mc_services_cont_intern that consists of 3 frames - each frame has the text to the specific sub menu of the section services.

that all happens on frame 4 of the main timeline.

so if i try to say now that i want this specific submenu to play with the if statement i listed above

well - that's what i don't understand how i can make it work!

thanks so much for trying to understand...
 
I'd like to possibly help you more on this, but it would really help to see the .fla in front of me. Can you post a link to it zipped up and in a MX only format?

You'd have a better chance of getting an answer if your .fla was in a MX only format, and zipped up.

You would have to save a copy of your MX2004 .fla, (using Save as...) and changing the Document type to MX only in the Save as... window.


Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top