2 Replies Latest reply on Apr 18, 2006 7:56 AM by simply-celestial

    problems with some actionscript. please help!

    simply-celestial
      hello

      im trying to build a site in Flash, using actionscript. but ive already run into some problems.

      ive created my master.swf file, to load in stuff and all that. and that works fine, but there is a problem.
      i have a shared libary for my fonts and repeated symbols throughout the page, that i want to use, i created a trigger swf file to load in my content, before my masters content plays, and basicly my loader works, i load in the trigger file with my movieClipLoader and tell my trigger file to start playing the master content. Now, i want to make a diplay message that should show while my shared lib. is loading. so all i did was create a new layer in my master.swf file, make the text "Loading..." and use_sans so that it loads instantly. this is where it goes wrong, when i test download my movie, its still just white screen!
      neither my BG layer or my text layer shows? not until my movie play? its like, 10 seconds to load, then boom, displays the loading.. on one frame, and then plays the rest of my content? kinda like AFTER the loading is done? what can i do?

      my actionscript is as follows:

      Master.swf

      1st. fram in my actions layer:

      stop();
      var myMCL:MovieClipLoader = new MovieClipLoader () ;
      var myListener : Object = new Object () ;

      myMCL.addListener(myListener) ;

      myMCL.loadClip("trigger.swf", 5);

      frame 10:
      stop();
      myMCL.loadClip("splash.swf", 5);

      Trigger.swf:
      frame 1:
      _level0.play();

      please help im a noob!

      also alll the content on my first frames bg and text layer is what it is, no actions on either layers. 2cnd frame of text layer it goes blank keyframe as i dont want to show the loading msg. on top of the rest of my content after my page loads.

      thnx alot on beforehand.

      Rune.
        • 1. Re: problems with some actionscript. please help!
          simply-celestial Level 1
          hmm i might have a idea of whats going on. my shared lib swf file is 76kb in all its glory, but the master.swf file is 96kb! hehe, so could it be, that the static information already on my master file (basicly just a bg image which im optimizing to be smaller as we speak) has to be loaded (as it IS the movie) before it starts to load my sharedlib? if so can i create a listener for my entire master.swf and make a pre-loader for that? because its not a great thing that my page takes 10-25 second to load on a 56k and there is nothing indicating progress...

          thnx, and please help!
          • 2. Re: problems with some actionscript. please help!
            simply-celestial Level 1
            DOH! how stupid am i! heh! sorry! sorry!

            as u might have discovered nothing, and i mean when i say that, NOTHING is wrong in the code, the problem resited in this:

            when i created my trigger file, i opened an external libary, the sharedlib.swf file, right? but guess what, i placed a font on my stage, aperently that only added to the libary, and not to the .swf movie itself, so my problem was basivcly that my trigger file didnt load/pre-cache ANYTHING at all, and thats why my movie did not stop playback at frame 1, it actually just played the movie. LOL. sorry!

            Rune,.