Jump to content
Search Community

Applauz

Members
  • Posts

    80
  • Joined

  • Last visited

Everything posted by Applauz

  1. I'm using the latest build. Same build I'm using in another project. I'm importing like this import com.greensock.*; import com.greensock.plugins.*; import com.greensock.easing.*; and my use is like this TweenMax.to(points_mc, .5, {y:96, delay:.5, ease:Expo.easeOut, startAt:{y:-828}} ); Am I missing something here ?
  2. To make it even stranger... TweenLite works.. only TweenMax doesn't work.
  3. Hello, I have used TweenMAX previously in AIR for iOS. I started a new project today and a basic tween of a MovieClip is being completely ignored. Any reasons this would happen ?
  4. So I found the problem. I had the images in question placed off stage. I was using onStart and onComplete parameters to handle the tweens. The x & y placement offstage had decimal values... as soon as I put the offstage positioning to whole number values the problem went away. Strange!
  5. Its just very simple x y tweens
  6. So Im just doing some simple tweens and my images are appearing blurry when they stop. It looks ilke the typical problem in Flash when an image is sitting with a decimal on the X and/or Y coordinate. Any ideas ?
  7. No .. I don't have any other calls to it. It's a really strange problem for sure. I just don't understand why it only happens if I close out of that movie clip and open up another movie clip that has a blitmask in it and then return to the previous one. If I open a movie clip that doesn't include a blitmask... and return back to the troubled movie clip .. it doesn't crash. I know that the iPad3 is strange and slightly buggy... especially in it's handling of retina graphics from AIR. But this is just strange. Another strange finding... MovieClip1 is the movie clip in question MovieClip2 is another movie clip with a blitMask in it ( this is what causes movieclip1 to crash) MovieClip3 doesn't contain a blitMask *When each of these movieclips is exited I am calling a destroy method that removes all listeners and nulls the closed out movie clip and also calls system.gc() If I open MovieClip1 then close it .. then open MovieClip2 then close it .. then open MovieClip1 .. it crashes. However.. If I open MovieClip1 then close it .. then open MovieClip2 then close it .. then open MovieClip3 then close it .. then open MovieClip1.. it doesn't crash.
  8. The problem is not present when using the update() function. It's only there when I run a disableBitmapMode. Also .. this problem only happens on iOS. Also an interesting finding. This problem only happens when I perform in the following order. 1.) Open movie clip that has a blitmask in it 2.) Close that movie clip, destroy all listeners, call blitMask.dispose() 3.) Open a different movie clip that also has a blitMask in it 4.) Close that movie clip, destroy all listeners, call blitMask.dispose() 5.) Re-Open the first movie clip ... when enable bitmapMode is called .. CRASH Strange that as the second movie clip I open .. I can open any other movie clip that doesn't contain a blitMask in it and the crash doesn't happen.
  9. To be sure .. can you tell me of a way to completely null and make sure blitMask is a fresh instance when I load up this movie clip for the second time. ? Is there something I can put in my killMovieclip function to be sure ?
  10. I have a very strange problem happening. I have a movie clip that gets loaded. It has a blitMask in it. When the MovieClip animates in with TweenMAX .. I have an onComplete:blitMask.disableBitmapMode being called. The first time I load this movie clip everything works just fine. However when I exit this movie clip and the movie clip is removed and nulled. .. The second time I access it .. When the TweenMAX runs and fires the onComplete:blitMask.disableBitmapMode .. the app crashes and shuts down. It happens every single time. Is there something conflicting when I remove the movie clip and null it ? maybe something not garbage collected with the biltMask ? ... or the Tweens ? if I remove "onComplete:blitMask.disableBitmapMode" .. the crash problem goes away. Thoughts ?
  11. One thing I discovered today. I had a movieclip being loaded from the library that has a blitmask setup in it. First time it loads on an iPad it's fine. When I kille and destroy that movieclip and then access it again it would always crash my app. I call blitmask.dispose() when I kill the movieclip and all crashing is fixed!
  12. I've managed to track the problem down to it being related to the size of the image. The image is 7022 x 624 I made a smaller image and it works fine.
  13. So I have managed to get a large image scrolling horizontally. .. However the image is extremely poor quality at all times. I am able to play with the bitmap mode settings and get the image to look fine when the movieClip first loads... but when scrolling is occurring the quality changes to the very poor quality .. and then when scrolling stops it jumps back to the good quality again. The problem with this is that I have a nice slow ease on the animation and it looks very weird that the quality is very bad then snaps to a good quality version after 2 seconds. Can someone have a look at this rendition of my code and tell me if there is a way to have my image appear in good quality the whole time ? This exact code works fine for me in another instance where I am using 100% shapes and drawings from within Flash ( no external imported bitmaps ) ... this is only happening on the image I have imported. // Blitmasking for Section 1 TweenPlugin.activate([ThrowPropsPlugin]); var blitMask:BlitMask = new BlitMask(coretechtimeline_mc, 0, coretechtimeline_mc.y, 1024, coretechtimeline_mc.height, true); blitMask.bitmapMode = false; var t1:uint, t2:uint, y1:Number, y2:Number, x1:Number, x2:Number; blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { // FIX for Button events // dragging = true; //i am now dragging offset = coretechtimeline_mc.mouseX; //setting the offset from the origin mouseDX = mouseX; // trace("bitmapMode is now FALSE"); blitMask.bitmapMode = false; TweenLite.killTweensOf(coretechtimeline_mc); y1 = y2 = coretechtimeline_mc.y; x1 = x2 = coretechtimeline_mc.x; t1 = t2 = getTimer(); coretechtimeline_mc.startDrag(false, new Rectangle(-99999,111 ,99999999, 0)); coretechtimeline_mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler); coretechtimeline_mc.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } function enterFrameHandler(event:Event):void { /// y2 = y1; x2 = x1; t2 = t1; y1 = coretechtimeline_mc.y; x1 = coretechtimeline_mc.x; t1 = getTimer(); blitMask.update(); } function enableBitMapMode():void{ trace("bitmapMode is now TRUE"); blitMask.bitmapMode = false; } function mouseUpHandler(event:MouseEvent):void { // FIX for button events in Throwprops // mouseUX = mouseDX; mouseDX = mouseX; vy = mouseDX - mouseUX; //trace("The RANGE was - " + Math.abs(mouseDX - mouseUX)); // coretechtimeline_mc.stopDrag(); coretechtimeline_mc.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); coretechtimeline_mc.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); var time:Number = (getTimer() - t2) / 1000; var yVelocity:Number = (coretechtimeline_mc.y - y2) / time; var xVelocity:Number = (coretechtimeline_mc.x - x2) / time; var yOverlap:Number = Math.max(0, coretechtimeline_mc.height - coretechtimeline_mc.height); var xOverlap:Number = Math.max(0, coretechtimeline_mc.width - coretechtimeline_mc.width); if (Math.abs(mouseDX - mouseUX) > tolerance){ trace("Mouse up was not within range of mouse down (10px), so is not a button press"); ThrowPropsPlugin.to(coretechtimeline_mc, {throwProps:{ y:{velocity:yVelocity, max:111, min:111, resistance:100}, x:{velocity:xVelocity, max:20, min:-6000, resistance:100} }, onUpdate:blitMask.update, ease:Strong.easeOut, onComplete:enableBitMapMode }, 10, 0.3, 0.2); } else if (Math.abs(mouseDX - mouseUX) < tolerance){ trace("Mouse up was within range of mouse down (10px), so is a button press "); //and will it work? No! trace("the detected button press was on: " + event.target.name); } }
  14. I have successfully made throw props work with vertical scrolling. When I change the obvious y's to x's and heights to widths... it doesn't seem to work. Can someone take a look at my vertical working code and tell me what I need to change to get this to work as horizontal ? // Blitmasking for Section 1 TweenPlugin.activate([ThrowPropsPlugin]); var blitMask:BlitMask = new BlitMask(coretechtimeline_mc, coretechtimeline_mc.x, coretechtimeline_mc.y, coretechtimeline_mc.width, coretechtimeline_mc.height, true); blitMask.bitmapMode = false; var t1:uint, t2:uint, y1:Number, y2:Number; blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { trace("bitmapMode is now FALSE"); blitMask.bitmapMode = false; TweenLite.killTweensOf(coretechtimeline_mc); y1 = y2 = coretechtimeline_mc.y; t1 = t2 = getTimer(); coretechtimeline_mc.startDrag(false, new Rectangle(0, -99999, 0, 99999999)); coretechtimeline_mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler); coretechtimeline_mc.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } function enterFrameHandler(event:Event):void { y2 = y1; t2 = t1; y1 = coretechtimeline_mc.y; t1 = getTimer(); //blitMask.scrollX = 0; blitMask.update(); } function enableBitMapMode():void{ trace("bitmapMode is now TRUE"); blitMask.bitmapMode = true; } function mouseUpHandler(event:MouseEvent):void { coretechtimeline_mc.stopDrag(); coretechtimeline_mc.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); coretechtimeline_mc.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); var time:Number = (getTimer() - t2) / 1000; var yVelocity:Number = (coretechtimeline_mc.y - y2) / time; var yOverlap:Number = Math.max(0, coretechtimeline_mc.height - coretechtimeline_mc.height); ThrowPropsPlugin.to(coretechtimeline_mc, {throwProps:{ y:{velocity:yVelocity, max:0, min:-748, resistance:100} }, onUpdate:blitMask.update, ease:Strong.easeOut, onComplete:enableBitMapMode }, 10, 0.3, 0.2); }
  15. Just to be clear .. I'm not having an issue with clicking on a button within a throwprops movieclip. I'm having the opposite. When I drag on a button that is inside a throwprops movieclip I dont want the button event to be fired. I only want that event fired if its a tap ( not a drag ) Sorry if I'm not making sense.
  16. Yes that is exactly what I'm trying to do. The part I don't understand is that I don't see any special code to go in the button handler. How does the application know to give preference to throwprops over the button instance ?
  17. @MrEmpty How would I accomplish this in my project. Here is my project code var blitMask:BlitMask = new BlitMask(sectionB_mc, sectionB_mc.x, sectionB_mc.y, sectionB_mc.width, sectionB_mc.height, true); blitMask.bitmapMode = false; var t1:uint, t2:uint, y1:Number, y2:Number; blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { trace("bitmapMode is now FALSE"); blitMask.bitmapMode = false; TweenLite.killTweensOf(sectionB_mc); y1 = y2 = sectionB_mc.y; t1 = t2 = getTimer(); sectionB_mc.startDrag(false, new Rectangle(0, -99999, 0, 99999999)); sectionB_mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler); sectionB_mc.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } function enterFrameHandler(event:Event):void { y2 = y1; t2 = t1; y1 = sectionB_mc.y; t1 = getTimer(); //blitMask.scrollX = 0; blitMask.update(); } function enableBitMapMode():void{ trace("bitmapMode is now TRUE"); blitMask.bitmapMode = false; } function mouseUpHandler(event:MouseEvent):void { sectionB_mc.stopDrag(); sectionB_mc.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); sectionB_mc.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); var time:Number = (getTimer() - t2) / 1000; var yVelocity:Number = (sectionB_mc.y - y2) / time; var yOverlap:Number = Math.max(0, sectionB_mc.height - sectionB_mc.height); ThrowPropsPlugin.to(sectionB_mc, {throwProps:{ y:{velocity:yVelocity, max:0, min:-768, resistance:100} }, onUpdate:blitMask.update, ease:Strong.easeOut, onComplete:enableBitMapMode }, 10, 0.3, 0.2); } Wouldn't I need some extra code for my button events so that buttons arent triggered while you are trying to scroll ?
  18. Thanks for the reply. I can't seem to get this working with my set up of Throwprops. How would I implement that code to mine ? I assume I would need to add some sort of code on all my buttons as well no ? var blitMask:BlitMask = new BlitMask(sectionB_mc, sectionB_mc.x, sectionB_mc.y, sectionB_mc.width, sectionB_mc.height, true); blitMask.bitmapMode = false; var t1:uint, t2:uint, y1:Number, y2:Number; blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { trace("bitmapMode is now FALSE"); blitMask.bitmapMode = false; TweenLite.killTweensOf(sectionB_mc); y1 = y2 = sectionB_mc.y; t1 = t2 = getTimer(); sectionB_mc.startDrag(false, new Rectangle(0, -99999, 0, 99999999)); sectionB_mc.addEventListener(Event.ENTER_FRAME, enterFrameHandler); sectionB_mc.stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } function enterFrameHandler(event:Event):void { y2 = y1; t2 = t1; y1 = sectionB_mc.y; t1 = getTimer(); //blitMask.scrollX = 0; blitMask.update(); } function enableBitMapMode():void{ trace("bitmapMode is now TRUE"); blitMask.bitmapMode = false; } function mouseUpHandler(event:MouseEvent):void { sectionB_mc.stopDrag(); sectionB_mc.stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); sectionB_mc.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); var time:Number = (getTimer() - t2) / 1000; var yVelocity:Number = (sectionB_mc.y - y2) / time; var yOverlap:Number = Math.max(0, sectionB_mc.height - sectionB_mc.height); ThrowPropsPlugin.to(sectionB_mc, {throwProps:{ y:{velocity:yVelocity, max:0, min:-768, resistance:100} }, onUpdate:blitMask.update, ease:Strong.easeOut, onComplete:enableBitMapMode }, 10, 0.3, 0.2); }
  19. I have Throwprops working perfectly. .. However I have a small usability issue. I have a page with numerous buttons on it. If the user touches one of the buttons to initiate a swipe the button is triggered. Is there a way to avoid this? I can't expect the user to only touch elements of the screen surrounding all buttons. Any help is appreciated.
  20. Problem solved. Didnt realize I missed this section1_mc.startDrag(false, new Rectangle(0, -99999, 0, 99999999)); I had section1_mc.startDrag(); Everything seems good now
  21. Sorry for so many posts. I got the performance thing fixed. Just can't figure out how to lock the X coord at 0 without setting scrollX to 0 in the enterframe
  22. Here is my updated code. Believe it or not .. performance is now even worse than it was before. .. Am I missing something here ? Your help is appreciated. TweenPlugin.activate([ThrowPropsPlugin]); var blitMask:BlitMask = new BlitMask(section1_mc, section1_mc.x, section1_mc.y, section1_mc.width, section1_mc.height, true); blitMask.bitmapMode = true; var t1:uint, t2:uint, y1:Number, y2:Number; blitMask.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); function mouseDownHandler(event:MouseEvent):void { TweenLite.killTweensOf(section1_mc); y1 = y2 = section1_mc.y; t1 = t2 = getTimer(); 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.update(); } function mouseUpHandler(event:MouseEvent):void { 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:300} }, onUpdate:blitMask.update, ease:Strong.easeOut }, 10, 0.3, 1); }
  23. So I removed all lines referencing scrollX ... and now when you drag its not locked on the X coord of 0. I don't want the user to be able to drag left & right.
  24. Hi, Sorry .. I'm just getting the hang of this plugin. The reason I was setting the scrollX to 0 was because it was shifting when I would drag left & right... I only want it to move then scrolling up and down. I'll apply the other changes and test again. Cheers!
×
×
  • Create New...