3 Replies Latest reply on Aug 1, 2007 2:09 AM by Marghoob Suleman

    Try this blur tween, onRollOver and RollOut..

    chrisatflash Level 1
      Hello,

      I ff you roll over the first button (red one) ..it will increase in size and decrease in Size when roll out.
      This goes well, but when you do it to soon, the startsize is to big. Is there a way to get the value of the current
      size when use the RollOut function?

      Also the blur value when tracing this does not work very well on the rollout. Sometimes it jumps from 10 to 0 ..
      it should work from 10, to 9, 8, 7,6,5,4,3,2,1,0 ..

      Can someone take a look at this code? I am not sure if i am doing it the right way.

      If you place 3 movieclips on your stage and call there instance names:
      rood_mc
      oranje_m;
      groen_mc

      and copy this code :

      import flash.filters.BlurFilter;
      import mx.transitions.Tween;
      import mx.transitions.easing.*;
      var sizeknop:Number = 200;
      var sizeknopstart:Number = 100;
      var speedknop:Number = 2; // 30 frames per seconden.
      var seconden:Boolean = true; // flase = gebruik frames p/seconden


      rood_mc.onRollOver = function() {
      var tweenSizeY:Object = new Tween(rood_mc, "_yscale", Strong.easeOut, sizeknopstart, sizeknop, speedknop, seconden);
      var tweenSizeX:Object = new Tween(rood_mc, "_xscale", Strong.easeOut, sizeknopstart, sizeknop, speedknop, seconden);
      var tweenBlur:Object = new Tween(oranje_mc, "blur", Strong.easeOut, 0, 10, 2, true);

      tweenSizeX.onMotionChanged = function() {
      blurwaarde = Math.round(oranje_mc.blur);
      //trace(blurwaarde);
      oranje_mc.filters = [new BlurFilter(blurwaarde, blurwaarde, 1)];
      blauw_mc.filters = [new BlurFilter(blurwaarde, blurwaarde, 1)];
      }
      }

      rood_mc.onRollOut = function() {
      var tweenSizeY:Object = new Tween(rood_mc, "_yscale", Strong.easeOut, sizeknop, sizeknopstart, speedknop, seconden);
      var tweenSizeX:Object = new Tween(rood_mc, "_xscale", Strong.easeOut, sizeknop, sizeknopstart, speedknop, seconden);
      var tweenBlur:Object = new Tween(oranje_mc, "blur", Strong.easeOut, 10, 0, 2, true);

      tweenSizeX.onMotionChanged = function() {
      blurwaarde = Math.round(oranje_mc.blur);
      trace(blurwaarde);
      oranje_mc.filters = [new BlurFilter(blurwaarde, blurwaarde, 1)];
      blauw_mc.filters = [new BlurFilter(blurwaarde, blurwaarde, 1)];
      }
      }