dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: HEAVYWEIGHTS: level ref prob after loadMovie

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    28
    I have persisted to make a variety of preloaders, trying to make the all singing all dancing contraption. However, loadMovie always seems to stuff me up.

    If I use loadMovie("myMovie.swf", "mc");
    and yes the variation of it clip.loadMovie as well
    then the movie that is loaded is all out of whack .. the code within the movie being loaded has a lot of refernces to levels, which are all thrown seeing as the swf is attached to an mc, which of course moves it up one level. If I use loadMovieNum and load it into level 0 .. the getBytesTotal command does not seem to calculate the total for both the preloader AND the swf that is being loaded.. it only traces the preloader's size in bytes .. I've forced the trace to run in a massive loop .. but it only traces the preloader's size.

    ALSO .. the Movieclip.getBytesTotal command .. is quite frustraing seeing as this is what the documentation states:

    "Method; returns the size, in bytes, of the specified MovieClip object. For movie clips that are external (the root movie or a movie clip that is being loaded into a target or a level), the return value is the size of the SWF file. "

    BUT .. when I run a trace it will only trace the mc's size in bytes .. I cant win .. nothing will function properly .. I am using MX and would have posted under MX section .. but the actionscript forum seemed to be more appropriate.. thanks in adv

  2. #2
    Junior Member
    Join Date
    Apr 2002
    Posts
    28
    ok .. so I did post it under MX forum .. you John smith of 1882 .. nope .. my mistake!!

  3. #3
    Senior Member
    Join Date
    Mar 2002
    Posts
    298
    Right, to sort out your problem with referances moving you simply need to make sure that you never use _root, this simply causes loads of problems and is simply not worth it. Always use _parents to get to the correct level.
    I've heard talk of using _level0, but I've had very limited success with this in the past.

    GetBytesLoaded and getBytesTotal I have been have loads of problems with recently. Unfortunately there's a bug in the player for these but I have been unable to pinpoint it exactly. The result is that code that works perfectly in the IDE simply does not work online. The exact problem that in some cases getBytesLoaded returns NaN rather than the number of bytes. This doesn't happen every time, and I've only experianced the problem when there are movies loaded into other movies. It's most irritating.
    I too was trying to make a preloader that did everything, ie loaded all movies in a site one after the other without them intruding on required bandwidth. But due to player bugs I have been unable to get it working perfectly. I'll wait for now until the IDE player is the same as the online one, and hopefully more bugs ironed out.

  4. #4
    Junior Member
    Join Date
    Jun 2002
    Posts
    24
    thanks c4.. at least I feel like Im not goin crazy .. never can tell with flash sometimes .. pity though.. I;ve never really used _parent .. I've been a _root basher .. so theres my prob .. thanks

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