Share Posted February 15, 2011 how can i give motion blur to a dragging rotating object without tweenmax, no realistic addEventListener(MouseEvent.CLICK, fOnEvent, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, fOnEvent, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, fOnEvent, false, 0, true); function fOnEvent(e : *):void { var vAngle:Number; switch (e.type) { case MouseEvent.MOUSE_DOWN : switch (e.target.name) { case "drag_menu" : stage.addEventListener(MouseEvent.MOUSE_MOVE, fOnEvent, false, 0, true); break; } switch (e.target.name) { case "hand" : stage.addEventListener(MouseEvent.MOUSE_MOVE, fOnEvent, false, 0, true); break; } break; case MouseEvent.MOUSE_UP : var blur1 = new BlurFilter(); blur1.blurX = 0; blur1.blurY = 0; main_menu.drag_menu.filters = [blur1]; stage.removeEventListener(MouseEvent.MOUSE_MOVE, fOnEvent); break; case MouseEvent.MOUSE_MOVE : var blur = new BlurFilter(); var drc:Number; var hdf:Number = main_menu.drag_menu.rotation; main_menu.drag_menu.filters = [blur]; vAngle = Math.atan2(mouseY - main_menu.y , mouseX - main_menu.x); main_menu.drag_menu.rotation = vAngle * 180 / Math.PI; drc=(hdf - main_menu.drag_menu.rotation); if (main_menu.drag_menu.rotation == hdf) { blur.blurX = 0; blur.blurY = 0; } else { blur.blurX = Math.abs(drc) * 2; blur.blurY = Math.abs(drc) * 2; } e.updateAfterEvent(); break; } } Link to comment Share on other sites More sharing options...
Share Posted February 15, 2011 Have you seen the motionBlur plugin? There's an example in the Plugin Explorer. It doesn't blur rotationally, though. It's more of an x/y motion blur that can go in any direction (not just horizontally or vertically). http://www.greensock.com/tweenlite/#plugins Link to comment Share on other sites More sharing options...
Author Share Posted February 16, 2011 yes i have club tweenmax but i cant use this project hmm... how can i give motion blur to a dragging rotating object with tweenmax possible ? because i cant use to shortRotation in the drag function can you help Link to comment Share on other sites More sharing options...
Share Posted February 16, 2011 I don't understand your question(s) - can you please provide more detail? A sample FLA with only the essential code would be great. Or some visual example. I'm very sleep-deprived, so forgive me if I'm missing something obvious here. Link to comment Share on other sites More sharing options...
Author Share Posted February 16, 2011 i cant use tweenmax in this sample but i wanna use tweenmax im sorry for my english thnX Link to comment Share on other sites More sharing options...
Share Posted February 22, 2011 No, motionBlur is not for radial blurs. As I mentioned, it is only for positional blurs (x/y). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now