Jump to content
Search Community

andrus

Members
  • Posts

    2
  • Joined

  • Last visited

andrus's Achievements

0

Reputation

  1. Never mind... I found a solution: bg_mc.onEnterFrame = function() { var targetY:Number = (((Stage.height - bg_mc._height) ) * (_ymouse/Stage.height)) + bg_mc._height/2; bg_mc._y += (targetY - bg_mc._y)/8 ; }; I had to align the image at the center of the movieclip, not top-left... However if there is a way to do it with TweenLite I'd be glad to use it, I guess the overall performance would increase. Thanks anyway.
  2. Hello guys, I need a little help to understand a couple of things: I'm trying to design a website with a _ymouse panning background image (this is an example of what I'd like to do: http://www.scotch-soda.com/#/collection/scotch1_0/detail )... here is the code I'm using (AS2): import com.greensock.TweenLite; myMouseListener = new Object(); myMouseListener.onMouseMove = function() { TweenLite.to(bg_mc,1,{_y:-_ymouse}); }; Mouse.addListener(myMouseListener); Questions: 1) According to your experience is this the best way to use TweenLite? 2) Of course by passing the parameter "-_ymouse" I only see part of the picture when I point the mouse to the bottom of the stage, because the _ymouse value is lower then the picture height... so this value must be a variable that changes as the stage size changes... forgive my ignorance but I don't know how to do it... Thanks very much for your help and thanks so much to Greensock!
×
×
  • Create New...