4 Replies Latest reply on Oct 5, 2006 5:22 AM by CPedrick

    code for film "jitter"?

    CPedrick
      I need to take a graphic and make it "jitter" slightly to simulate the look of an old-time film.
      Any thoughts?
      All ideas gratefully accepted.
      TIA,
      Carolyn
        • 1. Re: code for film "jitter"?
          Level 7
          sample here:
          http://www.flashkit.com/movies/Animations/Film_Cou-Scanman_-150/index.php

          have a search of that site as well...lots of great samples.

          --

          Dan Mode
          --> Adobe Community Expert
          *Flash Helps* http://www.smithmediafusion.com/blog/?cat=11
          *THE online Radio* http://www.tornadostream.com
          *Must Read* http://www.smithmediafusion.com/blog


          "CPedrick" <webforumsuser@macromedia.com> wrote in message
          news:efuh1p$232$1@forums.macromedia.com...
          >I need to take a graphic and make it "jitter" slightly to simulate the look
          >of an old-time film.
          > Any thoughts?
          > All ideas gratefully accepted.
          > TIA,
          > Carolyn


          • 2. Re: code for film &quot;jitter&quot;?
            CPedrick Level 1
            Thanks very much, Dan.
            That's a nice "countdown" for the beginning of the film, and I'll likely use it.

            But it sounds like I was not clear: what I am looking for is the slight "bounce" and flicker that old films have as the film feeds not quite smoothly through the projector. That countdown (which has some very nice noise in it) is rock solid on the screen, which an old film would not be.

            I did check around the site link you gave and there is some very cool stuff there, but it does not appear to have what I am looking for...

            any other thoughts?

            TIA again,
            Carolyn
            • 3. Re: code for film &quot;jitter&quot;?
              s&em
              Hello Carolyn ...

              Is this the kind of thing you're after? It may not be exact but I think it may be along the similar lines ...

              http://www.snem.co.uk

              If so, I just created a movie clip with two instances of the item to be blurred in it on separate layers. One I named itemA and the other itemB. Then at points along the timeline I added simple ActionScript to adjust the coordinates of itemB, such as:


              this.itemB._x = 1;
              this.itemB._x = -1;


              Obviously you could do this with a random value if you prefer. I also created some additional functions which are called at various points along the timeline, too. These restore the orginal coordinates and hide / show one or other of the instances:


              function restorePosition () {
              this.itemA._x = 0;
              this.itemA._y = 0;
              this.itemB._x = 0;
              this.itemB._y = 0;
              }

              function hideA () {
              this.itemA.visible = false;
              }

              function showA () {
              this.itemA.visible = true;
              }

              function hideB () {
              this.itemB.visible = false;
              }

              function showB () {
              this.itemB.visible = true;
              }


              These just serve to make coding a little easier and add to the "flickering" feel of the whole thing. I'm sure you will be able to achieve an old movie look if you do something along these lines ...

              To get some random look flecks appear on the screen (as with the example posted by dan mode), you could create a suitable movie clip using the same kind of process as above and then add some ActionScript along the following lines when you place it on the stage:


              onClipEvent (load) {
              setProperty(this, _x, (300 + random(200)));
              setProperty(this, _y, (400 + random(150)));
              setProperty(this, _width, random(80));
              setProperty(this, _height, random(64));
              this._alpha = 80;
              }
              onClipEvent (enterFrame) {
              if (this._alpha < 1) {
              setProperty(this, _x, (300 + random(200)));
              setProperty(this, _y, (400 + random(150)));
              setProperty(this, _width, random(80));
              setProperty(this, _height, random(64));
              this._alpha = 80;
              }
              }


              You may well have to alter the values a little to fit to your stage dimensions and the placement you want but I hope all this gives you something to play and experiment with. With the item I created, the alpha property is set to 0 at the end of the timeline to act as a trigger for the second part of the code just above - Apologies for not having an online example to show ...

              Let me know if you have any questions or queries and I'll do my best to help out where I can ...

              Cheers,
              Sean.
              • 4. Re: code for film &quot;jitter&quot;?
                CPedrick Level 1
                Hi, Sean.
                Looks like this, along with the flashkit piece suggested above, will get me well on the way to exactly what I am looking for.
                Thanks to all!
                Carolyn