Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE FLASH:HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

Re: Advanced camera panning

COW Forums : Adobe Flash

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
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
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]