Hello everyone,
Does anyone know why the function loadMovieNum when loading an external swf file does not load the background? How can I fix that?
Please I need urgent response.
Thanks in advance.
Printable View
Hello everyone,
Does anyone know why the function loadMovieNum when loading an external swf file does not load the background? How can I fix that?
Please I need urgent response.
Thanks in advance.
load what background? you mean the BG color of the external .swf you are loading?
this happens because.. you really only have 1 MAIN .swf (and this is where it gets the BG color from)...
by loading external .swf's (especially when using loadMovieNum()) you basically just overlaying tat .swf on top of your MAIN .swf
however using a MovieClipLoader instance or even just regular loadMovie() are other methods where having the BG color in an external.swf loaded into a main one wouldnt be good at all..
what you can do is, since Im assuming its only for a solid color BG change?
is have a big movieClip with either several key frames with a fill hatever color you need on each frame..
or use setRGB() to color the same single frame movieClip
so on each .swf loaded it fires a function that changes this background for you.
hm... understood.
I kindof changed it to open in a browser, so for now its loking good for me.
Thanks a lot for the help, it's gonna be useful in the future forsure. ;) :p :D
hmm.. I guess I dont understand.. you opening a pop-up window now? instead?
I can for sure help with keeping things the way they were...
its really just a simple fix.. and not much code I wouldnt think.
hm... it's kindof like a pop-up window.
I actually used this
and it opened a browser window.Actionscript Code:loadMovieNum("myMovie.swf", "_root.targetClip");
this project is for my faculty, and I found out that the profesor is opening everything in his browser so that's what helped me :)
Anyways, I would really like to se the answer (fix) of the problem, so I would know for the future.
And thanks a lot in advance and for any trouble for fixing this problem of mine :)
first.. this is wrong:
loadMovie() and loadMovieNum()
are two different methods/functions..
if you are using loadMovieNum() it expects a number as the second parameter to know _level (in the stack) it should load that .swf into..
example:
_root.targetClip.loadMovie("myMovie.swf");
(is the same as this: loadMovieNum("myMovie.swf", "_root.targetClip"); )
I just use the full path in the front..
however for loadMovieNum()..
you need to give a _level number to be used
loadMovieNum("myMovie.swf", 2);
for example..
there is NO target.. becuase you loading the .swf ON TOP of everything else.. (like a stack of papers)
using loadMoive() you can load your content/.swf into a target (usually an empty movieClip on the stage.. this empty movieClip acts as a holder for the newly loaded .swf)
hm... it has some sence. I was working with the loadMovie() and didn't actually get what I wanted so I found a code on the web for loadMovieNum(), and used it in several ways.
1. loadMovieNum("movie.swf", 0); //and levels 1 and 2 also didn't help :(
2. loadMovieNum("movie.swf", "_root.targetClip"); //did help me when I found out through what my profesor is watching the movie.
Anyways, thanks a lot for the help provided. Will be usefull I'm sure :) ;)
=============================================
edit: what bothered me the most is the background that didn't wonna load right. When I added the code 1. I got everything except the backround. So that was my main problem.