0 Replies Latest reply on Aug 9, 2010 10:27 AM by alexee77

    Control over .swf movie in browser

    alexee77

      I have a question.
      What should I change in the code of .swf movie clip to achieve the following:
      - .swf picture appears through fade-in effect at the first load in web-browser,
      on the page named e.g. /index.html (this is possible with the current code as below);
      - the same .swf picture appears without fade-in effect as static picture (appears the last frame of this .swf movie) on the page named, to say /index.fr.html
      I.e. it's required to skip to the last frame of the movie by clicking on /index.fr.html link.

       

       

       

      The code is as follows:

       


      var picTotal:Number = 1;
      var lightSpeed:Number = 5;
      var delay:Number = 5000;
      var count:Number = 0;
      function init():Void {
      var white:MovieClip = this.createEmptyMovieClip("wh", 10);
      with (white) {
      beginFill(0xFFFFFF);
      lineTo(Stage.width, 0);
      lineTo(Stage.width, Stage.height);
      lineTo(0, Stage.height);
      lineTo(0, 0);
      endFill();
      }
      white.blendMode = "add";
      showNext(white);
      }
      function showNext(clip:MovieClip):Void {
      clip.onEnterFrame = function():Void {
      this._alpha -= lightSpeed;
      if(this._alpha<=0){
      delete this.onEnterFrame;
      }
      };
      }
      init();