A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: my loadMovie swf is partially loaded?!?!

  1. #1
    Junior Member
    Join Date
    Jan 2001
    Posts
    11

    my loadMovie swf is partially loaded?!?!

    Not sure what i'm doing wrong. I have a main swf that uses loadMovie to load an external swf. this external swf has 3 buttons that cause 2 movieclips to move when rollOver states are executed. The amin movie does load the external swf (determined by onEnterFrame and bytesloaded/total) and I can mouse over the buttons and see their rollover states change, however, the other mc's in this movie do nothing. the only activity taking place is that you can rollover the 3 buttons and see their colors change. I've searched high and low but haven't found anything relevant solutions to my situation.

    What are the best coding practices for movies you know are going to be loaded into another movie? I've seen posts saying to not use _root. I am not using root in the external swf; i'm using 'this.'

    Also, when you load an external movieclip into your main movie:

    a) what is the benefit of loading it on a different level (loadMovieNum) vs. into a container movieclip (myClip.loadMovie)?

    b) when a movie has been loaded am I correct in assuming that, if loaded into a movieclip, you can control and reference that movieclip's properties and functions as though it were part of the main movie itself?

    c) am i also correct in assuming that once a movie is loaded any paths within that loaded that call on _root are actually now referencing the _root of the toplevel movie that loaded it?

    this is like "beat head on desk, lift, repeat." for me and any help on this subject would be most appreciated.

    ciao,

    --pkoanui

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    A) IMHO, basically the same thing. You can maybe more easily change some properies (like positionning...) when loading in a movie clip container, because most of the time, that container clip already exists on the stage. From the main movie, you can't change any property of a movie loaded on another level UNTIL it's fully loaded, because it simply doesn't exist until it's fully loaded. How can you change the aspect of something that doesn't exist? But you can pre-set any property within the "to be loaded movie" itself, and once it's fully loaded in the main movie, control it in the same manner you would control a movie loaded in a container clip.
    Another advantage of loading on another level, which is why I prefer it, and this will partially answer your B & C questions, is that there's pratically no need to change any scripts in any of the loaded movies on other levels. When loaded on levels, every .swf has it's own _root level, thus scripts that refer to _root in fact refer to the root level of the loaded movie and not the root level of the main movie in which these other movies are loaded, which is now refered to as _level0, if you need to target it from these external movies. On the contrary, when loading in a container clip which is part of the main movie, then any references to _root, refers to the root level of the movie that holds the container, and not the root level of the loaded movie itself. Thus most all references to _root must be changed to this and/or to _parent.

    Hope this makes sense to you and does somewhat clear up some of the issues!

  3. #3
    Member
    Join Date
    Aug 2003
    Location
    Kansas
    Posts
    34
    Hey, man. You were pretty detailed, but I can't be sure what's going on unless you could supply me with some FLAs.. zip them and upload or email them to me or something (acidgoat@acidgoat.com).

    As far as the 3 quyestions you asked:

    A.) Never tried anything but a container clip

    B.) Yes you can, as long as you use the proper reference (i.e. add the name of the containerclip before whatever you're trying to access)

    C.) Yes, _root always refers the the top level movie, even if you have multiple SWFs loaded.

    Other than that I can't do aynthing without FLAs... sorry

    --Brad

    edit: my mistake! upon reading OldNewbies post I realized that my answer to C is wrong! I thought you had to refer to them as _level1 etc and not _root. Sorry for the misinformation.

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    If loaded on levels... Question C... _root refers to the root level of the loaded movie itself. The top level movie, the main movie in which the other movies are loaded on other levels, is now _level0 and not _root.

  5. #5
    Junior Member
    Join Date
    Jan 2001
    Posts
    11

    nice.

    Thanks for getting back to me so soon. I really appreciate it. I think your answers have set me on the right path. Thanks again!

    --pkoanui

  6. #6
    Senior Member
    Join Date
    Feb 2002
    Posts
    375

    Question for oldnewbie

    Ok, if you prefer loading swfs into levels... do you prefer to use a preloader in the first scene with you main movie being in the second or have you found another useful way of doing it? and why do you get that flash of white when a movie loads into a level and loads out of a level?? and is there a way around this?

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    My preferences have nothing to do with your way of doing things. I'm not even into web design. I've never yet designed a site (even my own!), and don't really intend to!

    As for flashes of white when using loading on a level, I've never experienced that. Post a .fla in which it happens! I'll have a look!

  8. #8
    Senior Member
    Join Date
    Feb 2002
    Posts
    375
    I have no set way of doing things as I haven't created a website either, still trying to work out all the bits involved with doing that and believe me, I'm a long ways away

    I was just curious as to what sort of preloader you would use when loading movies into levels.

    This is probably not the right place to ask this, but why haven't you and why don't you intend on creating a web site? You seem to know pretty much everything about everything (when it comes to flash) so it should be a breeze for you?? You'd obviously have a lot to offer...

    Again, not the right place, but what are you into?

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Regarding preloaders... Somewhat something like that can be found in these two threads, adapted for levels...

    http://board.flashkit.com/board/show...hreadid=375161

    http://www.flashkit.com/board/showth...hreadid=456020

    As for what I'm into, check my occupation in my profile!

    Or this, only partial...

    http://us.imdb.com/Name?Gill,+Fran%E7ois

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