2 Replies Latest reply on Feb 12, 2007 6:56 AM by danedgar

    MCL Script Error In Flash 9

    danedgar
      I have a very simple site built in flash which loads various SWF files using MovieClipLoader.
      MCL is only called on a button press.
      There are no other significant scripts in the movie.
      The called SWF files range in size from 1MB - 2.5MB, contain limited functionality and a stop(); action in the first frame.

      The client is running 3 machines (PC, Power PC Macs & Intel Macs) and is reporting a Script error (The usual infinate running slowly one). On all test machines (11 in total PC, Power PC Macs & Intel Macs, 3 different locations with varying connection speeds) everything runs correctly and I have been unable to duplicate his issue.

      The only exception was a factory configured iMac, and even then only in Safari. I fixed this by updating the flash 9 player from r20 to r28. The client has done this but seen no change.

      Has anyone encountered a similar problem, or are there known issues with MCL and larger swf files?

      Any help would be greatly appreciated.

      Thanks

      dan.
        • 1. Re: MCL Script Error In Flash 9
          Level 7
          Hmmm, tough one. Seems to me it must be a connection speed issue. It happens
          on all client test machines... none of your test machines. Same players. You
          said you had varying connection speeds in your test machines - do any of
          them match the client's connection speed?

          It sounds like there must be something your code is doing while it's waiting
          for the files, and if it takes long enough it causes a problem.

          --
          Dave -
          Head Developer
          www.blurredistinction.com
          Adobe Community Expert
          http://www.adobe.com/communities/experts/


          • 2. Re: MCL Script Error In Flash 9
            danedgar Level 1
            Non of my test machines match exactly the clients connection speed (they're on a 512 connection) but I do have slower (dial-up) as well as faster conections.

            I'd normally agree that my code must be doing something else, but I swear the only this that's there to do anything is the MCL object and it's related status bar (triggered onLoadProgress).

            ---

            [code]

            stop();

            /* Initiate Vars */

            var img_folder:String = "folios";


            /* Image MCL Functionality */


            imgMCL = new MovieClipLoader();
            imgListener = new Object();

            imgListener.onLoadInit = function (imgMC) {
            imgLoadComplete(imgMC);
            }

            imgListener.onLoadProgress = function (target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
            var per:Number = Math.floor((bytesLoaded/bytesTotal) * 100);
            status_mc.loadBar_mc._width = per;
            status_mc.percentage = per;
            }

            imgMCL.addListener(imgListener);

            imgLoadComplete = function(imgMC) {
            this.gotoAndStop("site");
            status_mc._visible = false;
            folio_mc._x = 0;
            }

            createImg = function(file_name:String):Void {
            var file_name:String = img_folder + "/" + file_name + ".swf";
            var clip_ref :MovieClip= folio_mc;
            imgMCL.loadClip(file_name, clip_ref);
            }

            changeFolio = function (folio:String):Void {
            news_mc._x = 825;
            contact_mc._x = 825;
            folio_mc._x = 825;
            status_mc._visible = true;
            createImg(folio);
            }


            /* Start Initial Folio Load */

            changeFolio("folio1");

            [/code]

            ---

            From here changeFolio(); is only ever called using onRelease handlers attached to buttons. And that's it. No more script in there.

            The only time I've encountered anything similar has been with an online SWF player which appeared to have very broken download that paused for noticable amounts of time. Here the download is smooth (according to the clients viewing of the loadbar).