Loadmovie is out to get me [argh! & MX]

Here’s one that I couldn’t figure out if my life depended on it: :-\

I’m working on a site with a rather basic structure: The file “main.swf”, which contains the background images etc. will load two external swf’s:

 - the primary navigation (nav.swf)
 - site content (content01.swf)

nav.swf contains collapsible menus that will cover part of the content (content01.swf) while the user rolls over a primary link - that’s why I decided to load the navigation from an external file (nav.swf) into _level9, so it always “floats” above everything else (content goes into _level1).

content01.swf contains a secondary navigation for the user to navigate the stuff within content01.swf

my problem is now that the collapsible menus are (partially) transparent and, in one case, cover part of the secondary navigation within the content01.swf file.

While putting the site together, I helped myself with a nifty function that hides the secondary navigation in the content area while the primary nav is in roll over state - worked great.

But as soon as I created the external navigation file (nav.swf), it stopped working. The nav.swf file is loaded into an empty movie clip within main.swf like so:

[FONT=courier new][color=003366]onClipEvent (load) {
loadMovieNum(“nav.swf”, 9);
}[/color][/font]

Then (content01 is still on the main timeline, instance name “content01” - havent’ created separate file yet), when the user rolls over the link in question (a button in “nav.swf”), the following function is called

[FONT=courier new][color=003366]on (rollOver) {
_root.content01.hideButtons();
_root.menu.bt60.play(); <- plays an animation (menu fade-out)
}[/color][/font]

Now, as you can see, the function hiding all the secondary buttons “hideButtons()” is contained within the first frame of my “content01” MC - as long as the navigation and the content are on the same timeline, everything works fine - as soon as I load the navigation from an external file, the “hideButtons()” function doesn’t work anymore … hmpft.

As soon as it’s loaded into main.swf, shouldn’t my nav.swf recognize “_root” as the main timeline in main.swf?

I hope I’m making at least some sense here … any tips would be greatly appreciated :slight_smile: ,

kubik

Since you are using loadMovieNum try using _level0 instead of _root.

well, well, well …

ain’t that a kick in the head!! not only did i out myself as a “flash-idiot” (aka newbie) (-: , your suggestions most certainly did the trick!

two questions still bothering me …

i tried “loadmovie” instead of “loadmovieNum” … wouldn’t work … hmmmm

since I’m quite new to flash, could you eventually point me to a source where i can get some background info regarding the differences between the two (laodmovie, loadmovieNum) … i’ve been searching for a while - couldn’t find anything useful (especially not in the MX help or the manual)

thanks a bunch (especially for the super quick reply) - the help is greatly appreciated!! =)

kubik

  • who lived in philadelphia for two years (loved it!) and is german … even though “noch kein flasher fuer’s leben” (just yet)

loadMovie() - http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary423.html

movieClip.loadMovie() - http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary537.html

loadMovieNum() - http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary424.html

And pretty much a required resource when learning Flash Actionscript… The Actionscript Dictionary…

http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/

I hate it here in Philly. I cannot wait to leave this evil city. And don’t worry, you will be a flasher soon enough… YOU WILL CONVERT ■■■■ YOU!!! (sorry, I get a little crazy sometimes :beam: )

hey lostinbeta, any particular city calling you? or anything besides Philly will do? ■■■■, you sure are resourceful . . .

*Originally posted by subquark *
**hey lostinbeta, any particular city calling you? or anything besides Philly will do? Damn, you sure are resourceful . . . **

I like it up in New Hampshire, and I also like it in Maryland. I like small quiet areas, so pretty much any area like that will do :slight_smile:

And Thanks :slight_smile:

I live in Miami, am from Quebec and would like to move to Boston because our daughter is there and they speak english up there :stuck_out_tongue:

I hear Boston is nice :slight_smile: