FORUMS: list search recent posts

Re: Advanced camera panning

COW Forums : Adobe Flash

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Tyler FreemanRe: Advanced camera panning
by on Apr 22, 2012 at 2:25:40 am

My code:
import fl.transitions.Tween;
import fl.motion.easing.*;
import fl.transitions.TweenEvent;
var picTween:Tween
stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoved)
function mouseMoved(e){
var yPercent = mouseY / stage.stageWidth;
var newYPos = (stage.stageWidth - pic.width) * yPercent;
picTween = new Tween(pic, "y", Circular.easeOut, pic.y, newYPos, 1, true);
import fl.transitions.Tween;
import fl.motion.easing.*;
import fl.transitions.TweenEvent;
var picTween:Tween
stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoved)
function mouseMoved(e){
var xPercent = mouseX / stage.stageWidth;
var newXPos = (stage.stageWidth - pic.width) * xPercent;
picTween = new Tween(pic, "x", Circular.easeOut, pic.x, newXPos, 1, true);
}
}


Posts IndexRead Thread 


Current Message Thread:





© 2016 CreativeCOW.net All Rights Reserved
[TOP]