Jump to content
GreenSock

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

djmatix

Members
  • Posts

    6
  • Joined

  • Last visited

djmatix's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Exactly! Thanks for the advice, I'll take a look at the plugin explorer. I'd love to cut down the code for handling the movement of the cube because right now its pretty involved. I had to search around for quite a bit to get the code to make it work, and even loop the video once you reach the end so it spins continuously. If I could use TweenMax in a few lines i'd be very happy. cubeVid.buttonMode = true; cubeVid.addEventListener(MouseEvent.MOUSE_DOWN, pressHandler); function pressHandler(e:MouseEvent):void { startX = cubeVid.mouseX; startFrame = cubeVid.currentFrame; cubeVid.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler); stage.addEventListener(MouseEvent.MOUSE_UP, releaseHandler); } function releaseHandler(e:MouseEvent):void { cubeVid.removeEventListener(MouseEvent.MOUSE_MOVE, moveHandler); stage.removeEventListener(MouseEvent.MOUSE_UP, releaseHandler); } function moveHandler(e:MouseEvent):void { movCurrentFrame = cubeVid.currentFrame; changeDistance = Math.round((cubeVid.mouseX - startX) / 10); travelDistance = startFrame - changeDistance; if (travelDistance > cubeVid.totalFrames) { cubeVid.gotoAndStop(travelDistance % cubeVid.totalFrames); } else if (travelDistance < 0) { cubeVid.gotoAndStop(cubeVid.totalFrames + (travelDistance % cubeVid.totalFrames)); } else { cubeVid.gotoAndStop(travelDistance); } }
  2. I don't think i'm explaining what i'm trying to do clearly. The user initiates the movement of the playhead with their click/drag action. So it isn't a predetermined tween, its random based on the users input. So if anything, it'd want to ease after the user lets go of the cube, so it looks/feels like the cube is on a lazy susan, when its spun, it slows to a stop. Does that make sense?
  3. I appreciate your prompt response...AGAIN! I see the playhead scrubber on your header animation on the website. What i'm wondering, is if you can ease the movement after you let go. The idea i'm talking about is clicking and dragging on the actual movieclip, not a play head like a video player. That way it feels like the user is turning the cube animation by touching it. So the effect i'm looking for is when the user clicks/drags over the animation it plays it forwards or backwards but after they let go, the motion eases slightly as if you're throwing it a bit. So the cube spins, and then slowly stops instead of move/stop, move/stop. Think about the iphone list, when you scroll it, it eases to a stop. Same idea.
  4. I have a video that I rendered of a simple cube that is a perfect loop. I have some code setup to where when you click and drag on the video object it plays or reverses the video to make it look like the user is rotating the cube in 3d. (also you can drag it in one direction and it'll keep going in a loop) What i'm wondering is if this click/drag idea is possible using tweenlite/max. Since I wouldnt know where exactly the playhead should stop on the video because the user is clicking and dragging however they want, I'm wondering if this would be possible, or if I should modify the code I have to allow easing.....however that would be done. Any ideas would be greatly appreciated.
  5. Wow! Thank you so much for the quick response. Your solution fixed my issue. I'm thrilled that you are so active on the forums. Your support has compelled me to join the club Greensock! Thanks again, and I look forward to using TweenMax and digging deeper into its capabilities.
  6. Hello everyone! just thought i'd drop in and see if anyone can help me with my issue (which I imagine is a simple one). What I have is a movie clip labeled (cubeVid) on the timeline which i'm trying to tween in reverse. Basically the movieclip plays and inside the movieclip there is a stop(); command so it doesn't loop. What I am trying to do is make a button on the main timeline when pressed will tween the movie clip to play in reverse. I've tried this so many times different ways, even different types of movie clips. still NOTHING. It's like it ignores me. Am I doing something that isn't possible? Here is my code. import com.greensock.* import com.greensock.easing.*; stop(); cubeVid.stop(); var myTween:TweenLite = new TweenLite(cubeVid, 1, {frame:1}); //this makes a variable so I can control it with say....a function! button.addEventListener(MouseEvent.MOUSE_DOWN, backwards); // simple event listener on the button to listen for a click. function backwards(event:MouseEvent) : void //the function that is SUPPOSED to make the movieclip play backwards and ease nicely with tweenLite. { trace("Button Clicked, anything happen?"); //tracing to make sure the button code works and its being clicked. myTween.play(); /plays the tween I setup earlier } I've even tried doing the TweenLite.to command in the function itself. I can move the movie clip around, adjust its alpha, tint EVERYTHING so I know its setup and working properly, but when I try to rewind or even play the movieclip it won't work. I hope i'im doing something terribly wrong and it's obvious to someone. I love tweenLite! -Matt
×