Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

PauloMedia

Members
  • Posts

    2
  • Joined

  • Last visited

PauloMedia's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Jamie Jefferson Thanks for your help. I tried it though, and it hasn’t worked. Do you know if there is anything else I can try? Below is the code as I have it right now: var allowPresses:Boolean = true; function mouseDownHandler(event:MouseEvent):void{ allowPresses = false; TweenLite.killTweensOf(container); y1=y2=container.y; t1=t2=getTimer(); container.startDrag(false, new Rectangle(bounds.x, -99999, 0, 99999999)); container.addEventListener(Event.ENTER_FRAME, enterFrameHandler); container.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); } function enterFrameHandler(event:Event):void{ y2=y1; t2=t1; y1=container.y; t1=getTimer(); } function mouseUpHandler(event:MouseEvent):void{ TweenLite.delayedCall(0.01, function() { allowPresses = true; container.stopDrag(); container.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); container.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); var time:Number=(getTimer()-t2)/1000; var yVelocity:Number=(container.y-y2)/time; var yOverlap:Number=Math.max(0,container.height-bounds.height); ThrowPropsPlugin.to(container,{ease:Strong.easeOut,throwProps:{y:{velocity:yVelocity,max:bounds.top,min:bounds.top-yOverlap,resistance:50}}},10,.25,1); } noticia.addEventListener(TouchEvent.TOUCH_TAP, onNoticia); function onNoticia(event:TouchEvent):void{ if (allowPresses) { // the code to do what he have to do } } Regards, Paulo
  2. Hi Everyone, I’m writing due to a “Scroll function” I’m having difficulties in implementing for an APP. I’ve developed an APP for ios and android in Flash professional cs6 with AIR 3.2 and everything works perfectly apart from the scroll function. I’ve used the ThrowPropsPlugin and the movement works fine however it doesn’t allow me to select what I want to select in the container. Instead when I take off my finger it selects that element I’ve stopped on. In the ThrowPropsPlugin I’ve applied the mouse_down and mouse_up events to make the vertical movement, and inside the container I have MovieClips associated with events of touch_tap. So when I take my finger off automatically the movieclip is activated. Does anyone have a solution to this problem? I feel like I’ve tried everything. Removed the event, added events, changed events, the pressure, resistence of the container, changed the properties of MouseChildren and nothing. If anyone has any advice on this problem I would be most grateful.
×