This content has been marked as final. Show 7 replies
Songs() won't compile unless you correct its parameters: there should probably be a comma inserted between container and clipID.
and where's the function call to internalmovies(), the definitions of hula_cat_song and hula_cat_game and the function call to AllTheButs() , where's image_mcl defined and finally, why are you trying to load different swfs into the same target clip at the same time?
Let me try to explain this better.
First there are two mistakes in my posted code that happened when I pasted them into his forum. Those mistakes are not in the FLA. They are 1. In the second conditional, it should test for "hula_cat_game", not "hula_cat_song".. the #2 mistake, is that I forgot a comma in the Games() parameters. That mistake isnt in the real code though.
There are 2 main nav items - songs_btn and games_btn. What Im trying to do is if songs_btn is clicked, the songsmain.swf container clip loads from the hula array. That container clip, in turn, loads three button swfs into itself. Those three button swfs constitute the subnav of songs.
I dont think attention is need to the Movie loader class here. Those are working fine.
the issue: Each containr clip has some code that loads three subnav buttons SWFs. In the case of Songs, since we started from the songs_btn in the main nav, each of these songs subnav buttons need to have the URLS assigned to them that are found in "thesongs" array.
So to answer, Im not trying to load the different clips into the same clip at the same time. What im trying to do, is assign the appropriate urls from the appropriate array based on conditionals. The way Ive been trying to achieve that, is by creating unique Cat IDs and having the internamovies() function check for Cat IDs to determine whether to assign urls from the "thesongs" array, or games from the "thegames" array.. But its not working.
To answer, the internalmovies() function is called from the songsmain.swf that loads. For example, the songsmain.swf container movie has a call to _parent. internalmovies(). The function is hearing the call, but I dont know if its passing parameters correctly or not. Currently I have no parameters either container clip's call to _parent. internalmovies().
Does that make any more sense? i could me making this much more convoluted than it needs to be
thanks for your help!
the following sentence doesn't make sense or may be causing your problem: "Currently I have no parameters either container clip's call to _parent.internalmovies()."
all calls to internalmovies() must pass the two parameters it uses. to test use trace(Clipcat+" : "+CatIdent) in internalmovies().
Thanks a lot for your help so far!
So I changed it to this: _parent.internalmovies(Clipcat,CatIdent ). That didnt seem to affect anything, but I see how it its the right thing to do.
Whats really strange now is this:
In AllTheButs(), I have numerical CatIDs 1 & 2. internalmovies() doesnt see these Cat IDs in the conditional statements. Thus neither condition is met, and nothing plays. The trace you suggested comes back as "undedined:undefined". So it seems the parameters are not getting to interalmovies().
Now this is vexing -- if I change the Cat IDs in AllTheButs() to something non-numerical such as "songcategoryID", then the conditional statement in interalmovies() seems to ignore trying to satisfy the CatIDs in the condition altogether, and it goes ahead and plays the clip anyway(!). The trace in this case is also "undefined:undefined". So, in sum, not only are parameters are not making it to internalmovies(), but if the CatID is non-numerical, the conditional statement is simply ignored and Flash goes ahead and plays the clip anyway. Is this a partly a datatyping issue maybe?
I've been at this for a couple of days now. I cant figure this thing out and Im going Batty.
now you know the problem: Clipcat and CatIdent. they are undefined in internalmovies() when called from songsmain.swf.
now go to songsmain.swf and see if the two parameters(Clipcat and CatIdent) you're using in your _parent.internalmovies(Clipcat,CatIdent ) statement are defined in songsmain. if not defined in the line just above that call to internalmovies(), why not? where is that timeline supposed to retrieve those values? if they are defined, then you have a typo in your function call. if they are not go another step back to the timeline or function where they received the values of those parameters.
Thanks for the insight! I tried declaring the Clipcat and CatIdent variables in the loading subnav buttons (where the call to interalmovies() is), and that worked.
However, I cant do that. I am reusing these buttons for other nav items too so they cannot have specific variables/parameters hardcoded in them. Rather, the variables/parameters must be passed from the main movie to those buttons.
I wish there was a way that I could just call the function internalmovies() from the songs_btn.onRelease in the main movie timeline. I dont see why I have to have a functional call in teh subnav button SWF at all. So I tried adding the internalmovies(Clipcat, CatIdent) call in the main nav songs_btn.onRelease, but the function up above doesnt receive the parametersl. I still get an ndefined:undefined . So instead, I have to pass the parameters into the loaded buttons, and then the loaded buttons have to call the internalmovie() function back in the main movie. That seems a roundabout way of doing it. But again, if I do the internalmovies(Clipcat, CatIdent) function call from the songs_btn main nav, the internalmovies() function isnt receiving the parameters in that call. Any more very very generous advice?
songs_btn should work fine (as long as you pass the correct parameters to your function Songs() ). but what's that have to do with a button in songsmain.swf?
is songs_btn in songsmain.swf? do you have a path reference problem?