This content has been marked as final. Show 3 replies
well this is kind of like doing everything 'twice' - however the main problem here appears to be that you are using a 'number' in the 'target' parameter of the loadMovie method instead of a MC (ie. 10) - if you are attempting to target a 'level' then you need to use loadMovieNum() - but using the MovieClipLoader class is much better and offers many handlers and methods that are not available when using loadMovie().
the reason i say this is like doing everything twice is that you really only need to load that 'default' swf once - then within it you should have methods designed to load all other swf 'page' files - there's no need to navigate to another URL or cfm page -load the default again-and then load another file. this can all be done without 'reloading' the default simply by calling your loading method within the default script that contains your navigation structure and a MC 'holder' clip.
Thank you clbeech,
I think you may have misunderstood me (if I have not misunderstood you).
My reasoning for doing what I am is that each flash page will have its own search engine friendly html page, for example aboutus.html. All pages will contain an html version of the site complete with links, which will be replaced by the swfobject for browsers with Flash capabilities.
So once google (without Flash player) has indexed all my html pages, if a user clicks on the google result for about us, the aboutus.html page will load, which will then load the default Flash movie, passing in a variable telling it to load aboutus.swf as the default page. If the user clicks the result for services.html, that html page will load, which will again load the same default flash page, passing in the variable telling it to load services.swf.
It all works when hardcoding the swf to load into the first frame as outlined in my snippet above, but does not seem to like the variable name.
Any other ideas anyone?
lol - hey that's fine :)
however i still believe that the problem here is the '10' in the loadMovie call - and if you are targeting level10 then you would want to use loadMovieNum() instead.
also depending on the codes location you may not need _root.
another though here is to run a trace on the var and see if it's getting through properly to the default swf
just: trace(movieToLoad); previous to the the loadMovie call.