Jump to content
Search Community

Applauz

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by Applauz

  1. I have 2 images stacked.. both are 1024 x 768 fps is set to 60 This is an AIR for iOS projects in Flash CS5.5 Rendering is set to GPU Here is my code // Blitmasking for Section 1 TweenPlugin.activate([ThrowPropsPlugin]); var blitMask:BlitMask = new BlitMask(section1_mc, section1_mc.x, section1_mc.y, section1_mc.width, section1_mc.height, true); blitMask.scrollX = 0; // This makes the blitMask interactive blitMask.bitmapMode = false; var t1:uint, t2:uint, y1:Number, y2:Number; blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { blitMask.bitmapMode = true; TweenLite.killTweensOf(section1_mc); y1 = y2 = section1_mc.y; t1 = t2 = getTimer(); blitMask.scrollX = 0; section1_mc.startDrag(); section1_mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler); section1_mc.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } function enterFrameHandler(event:Event):void { y2 = y1; t2 = t1; y1 = section1_mc.y; t1 = getTimer(); blitMask.scrollX = 0; blitMask.update(); } function mouseUpHandler(event:MouseEvent):void { blitMask.bitmapMode = false; blitMask.scrollX = 0; section1_mc.stopDrag(); section1_mc.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); section1_mc.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); var time:Number = (getTimer() - t2) / 1000; var yVelocity:Number = (section1_mc.y - y2) / time; var yOverlap:Number = Math.max(0, section1_mc.height - section1_mc.height); ThrowPropsPlugin.to(section1_mc, {throwProps:{ y:{velocity:yVelocity, max:0, min:-768, resistance:200} }, onUpdate:blitMask.update, ease:Strong.easeOut }, 10, 0.3, 0.5); } Is there something I am doing wrong here ? It's extremely choppy and laggy
  2. I have some code in one FLA and when I compile it .. it works perfectly fine. ... When I create a new FLA in the same folder .. with the exact same code it generates the following error. ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData/ctor() at flash.display::BitmapData() at com.greensock::BlitMask()[/users/username/Desktop/AIR Prototype/com/greensock/BlitMask.as] at AIR_Prototype_fla::MainTimeline/frame1()[AIR_Prototype_fla.MainTimeline::frame1:343] I don't get why cloning my FLA is causing this error. This is the line that it's saying is the problem. var blitMask2:BlitMask = new BlitMask(bigBox.techChart, bigBox.techChart.x, bigBox.techChart.y ,bigBox.techChart.width, bigBox.techChart.height - 50, false); I've also traced out to make sure that none of these items are undefined. But even if I put in hardcoded values the error is still present.
  3. Hello, I'm hoping someone can help me out here. I'm working on an AIR application for the iPad and I have a section that is using a very large infographic. 5000 x 3750 My stage is 1024 x 768 (iPad) I have everything working.. however the animation is not smooth and seems to be jumping around on some touches. I also am trying to implement pinch zooming .. but when I add the pinch zooming scripts it doesnt work. ..but if I remove all the code from ThrowProps and only have the pinch zooming code it works fine. Any help with these 2 items is very much appreciated. Here's my code.. // Test Code for Tech Chart TweenPlugin.activate([ThrowPropsPlugin]); var blitMask2:BlitMask = new BlitMask(techChart, 0, 0 , 1024, 768, true); // This makes the blitMask interactive blitMask2.bitmapMode = true; var t1b:uint, t2b:uint, y1b:Number, y2b:Number, x1b:Number, x2b:Number; blitMask2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2); function mouseDownHandler2(event:MouseEvent):void { trace("This is a test"); TweenLite.killTweensOf(techChart); y1b = y2b = techChart.y; x1b = x2b = techChart.x; t1b = t2b = getTimer(); techChart.startDrag(); techChart.addEventListener(Event.ENTER_FRAME, enterFrameHandler2); techChart.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler2); } function enterFrameHandler2(event:Event):void { y2b = y1b; x2b = x1b; t2b = t1b; y1b = techChart.y; t1b = getTimer(); blitMask2.update(); } function mouseUpHandler2(event:MouseEvent):void { techChart.stopDrag(); techChart.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler2); techChart.removeEventListener(Event.ENTER_FRAME, enterFrameHandler2); var time:Number = (getTimer() - t2b) / 1000; var yVelocity:Number = (techChart.y - y2b) / time; var xVelocity:Number = (techChart.x - x2b) / time; var yOverlap:Number = Math.max(0, techChart.height - techChart.height); var xOverlap:Number = Math.max(0, techChart.width - techChart.width); ThrowPropsPlugin.to(techChart, {throwProps:{ y:{velocity:yVelocity, max:-147, min:-2803, resistance:6000}, x:{velocity:xVelocity, max:-237, min:-3746, resistance:6000} }, onUpdate:blitMask2.update, ease:Quad.easeOut }, 10, 0.3, 0.5); } Multitouch.inputMode = MultitouchInputMode.GESTURE; stage.addEventListener(TransformGestureEvent.GESTURE_ZOOM, fl_ZoomHandler); function fl_ZoomHandler(event:TransformGestureEvent):void { techChart.scaleX *= event.scaleX; techChart.scaleY *= event.scaleY; }
  4. I just purchased the membership and am trying to get going with this plugin. Can someone please show me how I can achieve the following. I have a movieclip on the stage that sits at an x:0 and never changes x coord. The y I want to scroll. The max Y value I want to be y:-1500; min would be 0 The part I'm struggling with is how to apply all the dragging, etc. so that the movieclip flows with the finger movement. Help with this would be greatly appreciated. Thanks!
  5. Hello, I have a grid of 6 boxes set up as a row of 2 .. column of 3. The boxes are blue. I have a grey box that will move to whichever blue box is clicked. The grey box starts as a default ontop of box1 ( top left box ). If the user clicks for example box number 6 .. which would be the last box at the bottom right.. I want the grey box to tween down 2 boxes and to the right once. I need to do this for each box... to make the tween follow a path in a sense. Can this be done with the greensock tools ? Any help is appreciated. Cheers!
×
×
  • Create New...