This content has been marked as final. Show 11 replies
The only thing I can think of is somehow separating your menu app from your playing app. Think frames where the loaded application is being loaded at _level0 from a completely different flash object on the page.
I know what u mean. Using executable and calling other executables using fscommand("exec",app2.exe) method. Unfortunatley exec method allows only one folder namely - fscommand. Therefore i cannot have different swfs belonging to differents apps with the same name in a single folder.
instead of "path/", use the string appropriate to your situation:
Thanks kglad. It never striked me to do the inheritance using prototyping. This is working at the first call But somehow it is not working at the second or subsequent loadmovie calls because the new prototyping of loadMovie is not carried on to the new swf file. Therefore the susequent calls are failing!
yes, i hadn't considered that. i don't believe there's any work-around.
the swfs that are loaded are using compiled code with loadMovie() defined the "old" way. and i know no way to alter that except to republish them with the prototype code.
But I guess, new prototype definitions come from the flash player rather than within the swfs themselves. Because its flashplayer that is providing the function definition, interpreting the swf and executing them and not swfs themselves.
I have even tried a sample application. But unfortunately u have to define the prototype in each individual swfs. Let me see, I am trying using _global
Hey Thanks a million its working. In fact i had a bug in my code.
Can you please tell me how to prototype the alternate form of loadMovie?
instead of mc.loadMovie("path") I want to use loadMovie("path",mc)
Is the code below OK? Does not seem to work!
You can try by loading swfs with a moviecliploader and modifiing each loaded movieclip function once the child movieclip gets loaded.
var mcl=new MovieClipLoader();
how'd you get it to work for loadMovie() statements in externally loaded swfs?
to change loadMovie() to accept two parameters (path/file name), you can use the following. but i'm not sure how that helps you because it requires changing each loadMovie() statement which was exactly what you didn't want to do:
your method actually works, because even the compiled swfs, actually call the altered function definition that is first executed by the flash player. All subsequent loadMovies , whether within compiled swfs or else where will now use the new function definition.
But unfortunately, I have a new problem. I am not using Movie.loadMovie(URL) property. Rather I am using the simple loadMovie(URL,mc) function in all my pre-compiled swfs. And therefore I was just asking how to override this loadMovie(URL,mc) function and not the property Movie.loadMovie(URL).
i don't know anything you can do to alter a global function (like loadMovie() ).