Jump to content
Search Community

Tweenrookie

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by Tweenrookie

  1. b1.onPress = function () { TweenLite.to (cds, 3, {_y:"-500", ease:Power2.easeInOut} ); } I am designing a presentation with a column of cds covers i want the user to skim through each time he/she clicks on button "b1".As you can see each image is 500 pxs away from the next. the problem is that if the user press button "b1" BEFORE the transition has completed, the tween is called again, and therefore a mismatch occurs. How can this be solved?
  2. TweenMax.staggerTo (pantalla_musica, 6, {_y:"-500", ease:Power2.easeInOut, onComplete:activar, onCompleteParams: ["{self}"]}, 0.4, mc ); The tween runs an array that contains 5 movieclips. In one hand, there is a "onComplete" that invokes an animation for each of the movieclips of the array. In the other hand, there is a "onComlpeteAll" at the end of the code-line, which tells the tween to run a trace, once all the animations have finished. The trace happens, but the last movieclip of the array doesn't run. However, when i delete "onCompleteall" (mc) the last moveclip of the array does run, just like the others. don't have a clue what could it be. Experts?
  3. Don't have a clue why i recieve a "Type mismatch" on the red line. The tween executes 5 times, because it receives by parameter, 5 different instances. When all of them are finished, i need to run "cargarpantalla" function. function mc(nombrecolumna){ TweenMax.staggerTo ( nombrecolumna.target.p, 3, {colorTransform:{ tint:0xFFFFFF, tintAmount:0.2 } }, cargarpantalla ); function cargarpantalla () { trace("hola") }
  4. code: function mostrar_musica () { abrircompuertas.play (); TweenLite.to (columnas, 3, {_x:235, _y:765, ease:Strong.easeOut} ) ; } function mostrar_dvds () { abrircompuertas.play (); TweenLite.to (columnas, 3, {_x:623, _y:457, ease:Strong.easeOut} ) ; } function mostrar_cds () { abrircompuertas.play (); TweenLite.to (columnas, 3, {_x:233, _y:865, ease:Strong.easeOut} ) ; } and so on... var abrircompuertas:TimelineLite = new TimelineLite ( {paused:true} ); abrircompuertas.insert (new TweenLite (compuertas.hoja1, 6, {_x:-51.65, _y:51.90 } ) ); abrircompuertas.insert (new TweenLite (compuertas.hoja2, 6, {_x:135.60, _y:133.75 } ) ); --------------------------------------------------------------------------------------------------- Is it possible to execute each red line code only after "abrircompuertas.play ();" is completed? Putting the tween that "abrircompuertas.play ();" calls, inside the function is not an option, because i have several functions that are running "abrircompuertas.play ();". Hence i dont want to have to go through all of them if i have to make a change in var abrircompuertas.
  5. Solved! " Absolutely, gpon. You can have as many tweens going as you want at the same time. For example: var t:TimelineLite = new TimelineLite(); t.insert( new TweenLite(mc1, 1, {x:100}), 0); t.insert( new TweenLite(mc2, 1, {y:200}), 0); that has mc1 and mc2 tweening different properties at the same time. If you haven’t done so already, I’d highly recommend watching the video at http://www.greensock.com/timeline-basics/ "
  6. Hello folks. So, i need to tween two objects at the same time. They do not share the same properties. One of them moves to a certain place, while the other moves to another certain place. I guess that is why i couldn't use "TweenMax.allTo" right? I have been looking at tutorials in youtube, and i could do it with TimelineLite, but that is for tweening one animation after another, and i want to animate them both at the same exact time. Suggestions?
  7. Does any body know why this is not working? (action script 2) var pictures: Array = new Array (pictures.p1, pictures.p2, pictures.p3); button.onPress = function () {animatepictures.tween.play(); } animatepictures.tween = TweenMax.allTo (pictures, 2, {_x:"50", _y:"50", paused:true }, 0.1); By the way, i need to concatenate a "this" with a string, is it possible? example: name.target.onPress = function () { this+"whatever".tween.play(); }
  8. I would like to learn how to use tweenlite by reading a manual. Is there such thing? I dont consider documentation a manual, by the way. I need a step by step guided process to learn how to use GSAP to its fully potential.
  9. Do you know if there are libraries with pre-built tweening effects?
  10. It worked perfectly! Thanks so much for taking your the time to help, Carl. you helped me a lot!
  11. Hi guys, again. This time: i have five movieclips (with different instance names, but same tween) and i am tweening them with a for loop. I need each movieclip to make a slight move onrollover (relatively to its position) , while returning back to its original position on onrollout. The way i tried to solve it, was setting exactly the same amount of pixels to the rollout, but with oposite value. The problem comes when i rollout the movieclip, BEFORE it completes the movement. I have attached a video for you to see it. and here is the code: for (i=0; i<links_menu.length; i++) { links_menu.onRollOver = function (){ TweenMax.to(this, 1, {_x:"19", _y:"-4.75"})}; links_menu.onRollOut = function (){ TweenMax.to(this, 1, {_x:"-19", _y:"4.75"})}; }; I also tried this, but didn't worked out, and i don't understund why: for (i=0; i<links_menu.length; i++) { links_menu.onRollOver = function (){ TweenMax.to(this, 1, {_x:"19", _y:"-4.75"})}; links_menu.onRollOut = function (){ var rolloutx = "this._x"; // rel.position of on rollout var rollouty = "this._y"; // rel. position of y on rollout TweenMax.to(this, 1, {_x:("this._x")-("this._x"), _y:("this._y")-("this._y"))})}; }; // _x = the relative position of x when i roll out minus same number. // _y = the relative position of y when i roll out minus same number. //Logically it should work but it doesn't was wondering if there is such thing as a reverse function on rollout? mov.zip
  12. Yes! I see... i was referring to the name, not the movieclip itself. Thanks again Carl.
  13. I need to tween five movieclips that are contained in the links_menu array. I want them to tween on onRollOver event. i used a for loop which seems to work fine, because when i put trace (this._name) it returned the name of the movieclip i was rollingover to, so until this point, it's all fine. However, when i put a TweenMax.to(this._name, 1, {anything}); nothing happens. clues? I am just begining to crawl in tweenlite as well as actionscript... sorry if this is too basic guys. for (i=0; i<links_menu.length; i++) { links_menu.onRollOver = function (){ TweenMax.to(this._name, 1, {_x:"19", _y:"-4.75"}); }}
  14. Somebody knows a big source of animation effects and tweens examples to copy from?
  15. Is there a way i can edit this post title so i can put [sOLVED] ?
  16. It Worked!!! Carl,You are the boss. This made my day. Thanks so much.
  17. Carl, thanks so much for taking the time to answer. That is exactly what i want to do. Unfortunately i had problems running the code in my own file. So I opened innerAnimation.fla to investigate what could it be. The first thing i noticed, was the animation was not working from Flash. Because i have GSAP v.11, i swap "staggerTo()" to "allTo()". Still didn't work. So i downloaded GSAP v.12 and got this message : The class or interface 'com.greensock.core.TweenCore' could not be loaded. What can i do? 1) I could stay on version 11, but -having changed staggerTo() to allTo()- the inner animation doesnt work. mc1 and m2 animate well, but inner animations dont. 2) when i changed to version 12 i got thar error... any hint?
  18. I have five movieclips, with different instances, since i would want to use them as buttons later with different actions. (let's call them mc_1, mc_2, mc_3, mc_4, and mc_5) Each of this moveclips will share the same tween for movement. Now, here comes the tricky part -for me- : Each movie clip, share a common nested-moviecli. It is the same instance for all of them. Let's call it inner_animation. What i want to do, is to tell each movie clip (mc_1, mc_2 ...) to run inner_anmation once the tween has completed. Here is an example for what i have for mc_1: import com.greensock.TweenLite; import com.greensock.easing.*; TweenLite.to( mc_1, 0.5, {_x:"200", _y:"100", ease:Strong.easeOut, onComplete:RunInnerAnimation} ); function RunInnerAnimation() { TweenLite.to( mc_1.inner_animation, 1, {_x:"50", _y:"50", ease:Regular.easeOut} ); } As you can see this method wont work, since i would have to write one function for each moveclip. I was thinking something like: This.inner_animation but couldnt make it work. Any smart guy out there?
×
×
  • Create New...