A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Problems with loadmovie

  1. #1
    Junior Member
    Join Date
    Jun 2001
    Posts
    2
    I create 2 frames, say frame A and B. In frame A, there is a "loadmovie" command which loads A.SWF and also in frame B another "loadmovie" command loads B.SWF. Why is that when I click frame A and then frame B and back again to frame A, the browser (Netscape Comm 4.74) always loads the A.SWF from the website. Doesn't Flash player keep copies of each swfs files that has been downloaded from the website in the PC's memory ? This is another one problem. I create the A.SWF in frame A which contain another swf say C.SWF which contain one more swf say D.SWF, while in frame B, there's only B.SWF. I tested the movies at my local PC and it run smoothly, but not after I upload it to the website. I clicked frame B, and it's OK, but when I cliked frame A, nothing appear. What happened ? Please advice. Thank you.

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Location
    UK
    Posts
    875
    Not really sure what you mean, but if it's working ok on
    your own pc but not when you upload it to the web, make sure that each swf is in the same directory as the main swf

    Not sure if this will help.

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Posts
    2
    I apologize for not mentioning the details. I create 2 buttons, button A and B, a blank movie clip instance say "theclip" on which the other swfs would be played. In the main scene's timeline, I create 3 layers, from the bottom named "theclip" which contain theclip instance at frame 1 to frame 3, "A selected" layer which contain button B at frame 2, and at the top layer named "B selected" which contain button A at frame 3. At layer "A selected" frame 2, the frame's actionscripts are : stop(); loadmovie("theclip","A.SWF");, and at layer "B selected" frame 3, the scripts are : stop(); loadmovie("theclip","B.SWF");. In button A, the scripts are : on (release) gotoandplay(2); and in button B, the scripts are : on (release) gotoandplay(3);. Everytime I clicked button A or B, the browser always downloaded the A.SWF or B.SWF from the website, even though I had clicked them many times. Can you imagine how long does it take just to switch from A.SWF to B.SWF (especially in slow internet connection) if each swfs have 500 KB ? Shouldn't Flash player or the browser has somekind of cache feature ? The next problem is, I create A.SWF which main timeline has a layer that loadmovie another swf say C.SWF, which in turn loadmovie another one swf named D.SWF. I clicked button B and it played the B.SWF, but when I clicked button A, nothing appear or blank. I have placed all the swfs (A,B,C,D) in one directory at the website. What's wrong with these clip ? Again, I'm looking forward to any advice. Thanks.

  4. #4
    Senior Member
    Join Date
    Oct 2000
    Location
    UK
    Posts
    875

    resolved

    The problem is in the actionscript.

    You have the code in one frame ie.

    stop();
    loadmovie("theclip","B.SWF");

    Flash is stopping at the stop() command and not executing the load movie (which is the wrong syntax, it should be something like - loadMovie("B.swf", _root.theclip), make sure you name theclip on stage in the instance properties toolbox.

    Spread the script across 2 keyframes. The first should be placed where you want the movie to be loaded and should read -

    loadMovie("B.swf",_root.theclip);

    in the next frame put -

    stop();

    This way the loadMovie command gets executed and THEN the
    movie stops.

    This should point you in the right direction, hope it helps.

    [Edited by optical on 06-14-2001 at 02:15 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