A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: loadMovieNum... little problem

  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    4

    loadMovieNum... little problem

    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.

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    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.

  3. #3
    Junior Member
    Join Date
    Sep 2010
    Posts
    4
    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.

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    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.

  5. #5
    Junior Member
    Join Date
    Sep 2010
    Posts
    4
    hm... it's kindof like a pop-up window.
    I actually used this
    Actionscript Code:
    loadMovieNum("myMovie.swf", "_root.targetClip");
    and it opened a browser window.
    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

  6. #6
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    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)

  7. #7
    Junior Member
    Join Date
    Sep 2010
    Posts
    4
    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.
    Last edited by enferty; 09-09-2010 at 01:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center