Jump to content
GreenSock

vdubplate

Members
  • Posts

    49
  • Joined

  • Last visited

vdubplate's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I actually got it to work eventually although I didn't get the result I was looking for.
  2. Can anyone see why my onComplete function in function test2 will not work? I'm testing and I can not get it to fire. [as] import flash.events.MouseEvent; import com.greensock.*; import com.greensock.easing.*; import flash.events.Event; var Clicking:uint=0; var tab_x = CLIPcontainer_mc.x; CLIPcontainer_mc.mc1_mc.buttonMode = 1; CLIPcontainer_mc.mc2_mc.buttonMode = 1; CLIPcontainer_mc.mc3_mc.buttonMode = 1; CLIPcontainer_mc.alpha = 0; var AutoPlay:TimelineMax = new TimelineMax({repeat:-1}); AutoPlay.append(TweenMax.to(CLIPcontainer_mc, 3, {alpha:1, delay: 1})); AutoPlay.append(TweenMax.to(CLIPcontainer_mc, 3, {x:tab_x + -270, delay: 1})); AutoPlay.append(TweenMax.to(CLIPcontainer_mc, 3, {x:tab_x + -540, delay: 1})); AutoPlay.append(TweenMax.to(CLIPcontainer_mc, 1, {alpha:0})); AutoPlay.restart(); CLIPcontainer_mc.mc1_mc.addEventListener(MouseEvent.CLICK, test) CLIPcontainer_mc.mc2_mc.addEventListener(MouseEvent.CLICK, test2) CLIPcontainer_mc.mc3_mc.addEventListener(MouseEvent.CLICK, test3) function test(event:MouseEvent):void{trace("C1"); AutoPlay.pause();} function test2(event:MouseEvent):void{ trace("C2"); AutoPlay.append(TweenMax.to(CLIPcontainer_mc, 3, {x:tab_x + -270, delay: 1, onComplete: GO})); function GO():void { trace('onComplete:Pause working!'); AutoPlay.pause(); } } function test3(event:MouseEvent):void{trace("C3"); AutoPlay.pause();} [/as]
  3. Yes I totally missed that. Thanks for clarifying for me.
  4. I got this to work: var photo = document.getElementById("box"); TweenLite.to(photo, 1.5, {css:{width:"200px"}}); The documentation mentioned that this would work but had no luck: var photo = document.getElementById("photo"); TweenLite.to(photo, 1.5, {width:200});
  5. Thanks guys, I sent over the code with the wrong variable but I had tried it with the box variable set up correctly and was still a no go. So I have to use the CSS plugin to change the size? I did have that commented out in my code. That worked fine. The example in the documentation wasn't workign out for me though which would have been: var photo = document.getElementById("photo"); TweenLite.to(photo, 1.5, {width:100}); Is the first exaple in the getting started guide.
  6. I decided to try this out today. I was able to get stuff tweening around when I use the css plugin but I can't get the first example to work. var photo = document.getElementById("#box"); TweenLite.to(box, 1.5, {width:200}); I attached a very basic example. Can someone tell me what I did wrong? I had some developers at my job take a stab with no luck.
  7. I'm trying to make a scrolling text field in a file I'm working on. The problem I am having is that no matter what I do the text eases in and slows down at the end of the tween. I have tried the code below with no luck: TweenLite.to(text1_txt, 30, {x:-2000, y:464, ease:"None"}); TweenLite.to(text1_txt, 30, {x:-2000, y:464, ease:"Linear.easeNone"}); Can someone explain what I need to do to get a linear tween? Thanks in advance - John PS: I would have searche dthe forums for "how to turn off easing in a tweeen" but the forum won't allow me.
  8. Hmm, I see what you mean. What I have is a 3 tab menu that opens as you click on the tab and will unmask and article in each tab. I'm having a problem getting that to work right. I cant figure out how to be able to get to the scrollbars under the masks if that makes sense.
  9. I was hoping someone can help me out. I need to scale a movieclip. Right now I'm only able to stretch a movieclip. What I'm trying to do is have a movieclip that I want to have a mask inside of. When the movieclip scales it should mask and unmask whats inside of the movieclip. Because I am stretching the movieclip, its stretching everything inside the movieclip which I don't want. Here is a simple piece of code. Can someone tell me how to scale instead of stretch please import com.greensock.*; TweenLite.to(mc, 1, {scaleY:1.3});
  10. Hi Carl, Thanks for getting back to me so quick. In a nutshell I am stretching a mask. I was using: ScaleX when I should have been using Width as you pointed out. Thanks so much for your help.
  11. How would I specify the exact distance then? I want to go about 40 pixels out from my 300 pixel box and then back
  12. I was hoping someone could help me out. This should be really simple and I cant figure it out. So I have an ad that I am working on. Its 300x250 and it expands to lets say 560. I have a mask thats 300x250 and I want to animate that open to the length of 560 and when the user clicks the close button it needs to go back to 300. Ive done it before and today I cant get it to work. What's happening in my code is the mask animates to the right and never stops. If I pull the window open the mask opens infinately. This is my code and I have attached a simple file with my code inside if thats easier Thanks ahead of time for the help. import flash.events.MouseEvent; import com.greensock.*; import com.greensock.easing.*; Open.addEventListener(MouseEvent.CLICK, OpenNow) function OpenNow(e:MouseEvent):void{ TweenLite.to(Mask,2,{scaleX:560, ease:Expo.easeIn}); } Close.addEventListener(MouseEvent.CLICK, CloseNow) function CloseNow(e:MouseEvent):void{ TweenLite.to(Mask,2,{scaleX:0, ease:Expo.easeIn}); }
  13. Cool. I'm going to give it a try. Thanks for the reply.
  14. I was checking out the the new plugin and I was thinking about how I could use this for a new rich media ad I'm going to be working on soon. What my question is and there is prob not a short answer for this question. I want to make my ad function like this sweet HTML5 site for Tron : http://disneydigitalbooks.go.com/tron/ (Drag the site from right to left) How hard would it be to figure out how to move things on the stage based on position of the dragged portion of the stage or scroller on the stage? I want to move the ad from right to left and as a certain portion of the stage comes into view so would products videos and text in the way that the Tron site is functioning
  15. Thanks Carl I'll give this a go in the morning and keep the code on hand for next time. I appreciate the time you put in to show me this. - John
×