SOLVED-dynamicTween-LiquidArea-MotionBlurPlugin-problem

TransformManager questions/comments/discussions

SOLVED-dynamicTween-LiquidArea-MotionBlurPlugin-problem

Postby peteragentweb » Mon Feb 08, 2010 5:10 pm

Hi,
I'm testing some of the stuff i purchased yesterday. I'm very glad, but i've got one question :
Is it possible to use motion blur pluggins with dynamicTween and LiquidArea ?
I try this and it doesn't seem to work : :|
Code: Select all
package com.peteragentweb.atelierblick.labo {
   import com.greensock.plugins.TweenPlugin;   
   import com.greensock.easing.Quint;   
   import com.greensock.layout.AlignMode;   
   import com.greensock.layout.ScaleMode;   
   import com.greensock.layout.LiquidArea;
   import com.greensock.plugins.MotionBlurPlugin;

   import flash.events.MouseEvent;   

   import com.greensock.layout.LiquidStage;   

   import flash.display.StageQuality;   
   import flash.display.StageScaleMode;   
   import flash.display.StageAlign;   
   import flash.display.MovieClip;

   /**
    * @author peteragentweb
    */
   public class LayoutTest extends MovieClip {
      private var ls : LiquidStage ;
      private var area : LiquidArea ;
      private var area2 : LiquidArea ;
      private var menuIsDeployed : Boolean = false;

      public function LayoutTest() {
         stage.align = StageAlign.TOP_LEFT;
         stage.scaleMode = StageScaleMode.NO_SCALE;
         stage.quality = StageQuality.BEST;
         TweenPlugin.activate([MotionBlurPlugin]);
         
         var mc : MovieClip = this["mc2"];
         mc.buttonMode = true;
         mc.addEventListener(MouseEvent.ROLL_OVER, over);
         mc.addEventListener(MouseEvent.ROLL_OUT, out);
         var mc2 : MovieClip = this["mc"];
         ls = new LiquidStage(this.stage, 900, 600, 900, 600);
         area = new LiquidArea(this, 0, 570, 900, 300, 0x0000FF);
         area.attach(mc, ScaleMode.STRETCH);
         area2 = new LiquidArea(this, 0, -550, 900, 550, 0xEEEEEE);
         area2.attach(mc2, ScaleMode.HEIGHT_ONLY, AlignMode.LEFT,  AlignMode.CENTER );
      }

      private function over(e : MouseEvent) : void {
         if(!menuIsDeployed) {
            area.dynamicTween(.4, {y:ls.stage.stageHeight - 300, ease:Quint.easeInOut, onComplete:complete, motionBlur:{strength:3, quality:3}});
            area2.dynamicTween(.441, {y:-area2.height + 30, ease:Quint.easeInOut, motionBlur:{strength:3, quality:3}});
         }
      }

      private function out(e : MouseEvent) : void {
         if(menuIsDeployed) {
            area.dynamicTween(.41, {y:ls.stage.stageHeight - 30, ease:Quint.easeInOut, onComplete:complete, motionBlur:{strength:3, quality:3}});
            area2.dynamicTween(.41, {y:10, ease:Quint.easeInOut, motionBlur:{strength:3, quality:3}});
         } else {
         }
      }
      
      private function complete() : void {
         menuIsDeployed =!menuIsDeployed;
      }
   }
}


have you any suggestion, ?
Thank You.

*EDIT : perhaps, the motion doesn't affect tel liquidareas?
Last edited by peteragentweb on Wed Feb 10, 2010 6:25 pm, edited 1 time in total.
peteragentweb
 
Posts: 3
Joined: Sun Feb 07, 2010 7:17 am

Re: dynamicTween - LiquidArea - MotionBlurPlugin - problem

Postby greensock » Tue Feb 09, 2010 4:26 pm

I don't see anywhere that you're adding the LiquidArea to the display list, so you'd never see the motionBlur. Remember, LiquidArea is NOT a container, so when you attach() objects, they're not getting added as children of that LiquidArea. This is actually a very good thing because it means LiquidArea is respecting your heirarchy and doesn't force you to nest things differently. Think of it almost like a background that, when resized/moved, forces the attached objects to move/scale accordingly.

If you want to see the LiquidArea, you can either addChild() to your container or just set the "preview" property to true.
User avatar
greensock
Site Admin
 
Posts: 4719
Joined: Wed Jun 11, 2008 2:13 pm
Location: Chicago

Re: dynamicTween - LiquidArea - MotionBlurPlugin - problem

Postby peteragentweb » Wed Feb 10, 2010 6:24 pm

Thank tou for your answer and your explanations.
I decided to simply pin my object to "motionBlur" them.
It works fine.

;)
peteragentweb
 
Posts: 3
Joined: Sun Feb 07, 2010 7:17 am


Return to Transforming