Jump to content
Search Community

MrMiyagi

Members
  • Posts

    5
  • Joined

  • Last visited

MrMiyagi's Achievements

0

Reputation

  1. Ok, This worked. Just changed the function myfunction(nameofthesplittextfieldvariable:String, delaynumber:int):void to --> function myfunction(nameofthesplittextfieldvariable:Object, delaynumber:int):void Works perfect. Thank you.
  2. Thanks, I changed myfunction('text1', 8); to--> myfunction(text1, 8); It seems something is still wrong because the same error appears with another new one. I might verywell have some beginner mistakes in my code. I get the following errors: Thanks for help!
  3. Hello, I am trying to call a function that contains timelinemax, tweenmax and splittextfield. The problem is that the textFields property does not seem to work from inside this function. I get the following error message from all 3 lines inside the function where i call the function parameter "nameofthesplittextfieldvariable".textFields : Here is how my function needs to work: var text1:SplitTextField = new SplitTextField(this.pic1_mc.txt1); function myfunction(nameofthesplittextfieldvariable:String, delaynumber:int):void { timeline.appendMultiple(TweenMax.allFrom(nameofthesplittextfieldvariable.textFields, 1, {y:"-100", autoAlpha:0, ease:Elastic.easeOut}, 0.05)); for (var i:int = nameofthesplittextfieldvariable.textFields.length - 1; i > -1; i--) { timeline.insert( TweenMax.to(nameofthesplittextfieldvariable.textFields[i], 2, {blurFilter:{blurX:10, blurY:10}, x:Math.random() * 650 - 100, y:Math.random() * 350 - 100, scaleX:Math.random() * 4 - 2, scaleY:Math.random() * 4 - 2, rotation:Math.random() * 360 - 180, autoAlpha:0, delay:delaynumber, ease:Quad.easeIn, repeat:0, repeatDelay:1.2}) ); } } myfunction('text1', 8); This works beautiful without the function, but would like to make it all happen without repeating code, so would be thankful for a solution of how to make the textFields property work with the function? Thank you!
  4. Hello, I am developing a flash presentation that has a background picture slideshow with fade effect and text with effects. I am using timelinemax, splittextfield and some tweenmax effects. My problem is that I can not seem to get this text effect work inside a timeline: timeline.insert(TweenMax.allFrom(stf.textFields, 1, {y:"-100", autoAlpha:0, ease:Elastic.easeOut}, 0.05)); I get this error message: if i add that line of code outside the timeline, it works ok. I would also like to know what all you experienced coders think of my code and could it be done better. All tips are welcome. Here it is: import com.greensock.*; import com.greensock.TweenMax; import com.greensock.text.SplitTextField; import com.greensock.easing.*; import com.greensock.plugins.*; var timeline:TimelineMax = new TimelineMax({repeat:-1, yoyo:false, repeatDelay:0.3}); var stf:SplitTextField = new SplitTextField(this.pic1_mc.pic1text); //timeline starts timeline.insert(TweenMax.allFrom(stf.textFields, 1, {y:"-100", autoAlpha:0, ease:Elastic.easeOut}, 0.05)); timeline.append( TweenLite.to(pic1_mc, 1, {delay:8, alpha:0}) ); //applying splittextfield to the same text that was brougt on stage with Tweenmax elastic.easeout. for (var i:int = stf.textFields.length - 1; i > -1; i--) { timeline.insert( TweenMax.to(stf.textFields[i], 2, {blurFilter:{blurX:10, blurY:10}, x:Math.random() * 650 - 100, y:Math.random() * 350 - 100, scaleX:Math.random() * 4 - 2, scaleY:Math.random() * 4 - 2, rotation:Math.random() * 360 - 180, autoAlpha:0, delay:6, ease:Quad.easeIn, repeat:0, repeatDelay:1.2}) );} //Fading tha backgroundpictures. More text with effects will be added on top of these pictures. timeline.append( TweenLite.to(pic2_mc, 1, {delay:5, alpha:0}) ); timeline.append( TweenLite.to(pic3_mc, 1, {delay:5, alpha:0}) ); timeline.append( TweenLite.to(pic4_mc, 1, {delay:5, alpha:0}) ); timeline.append( TweenLite.to(pic5_mc, 1, {delay:5, alpha:0}) ); timeline.append( TweenLite.to(pic6_mc, 1, {delay:5, alpha:0}) ); timeline.append( TweenLite.to(pic7_mc, 1, {delay:5, alpha:0}) ); timeline.append( TweenLite.to(pic8_mc, 1, {delay:5, alpha:0}) ); timeline.append( TweenLite.to(pic9_mc, 0, {delay:5, alpha:1}) ); //fades back to the first picture and restarts the timeline. timeline.append( TweenLite.to(pic1, 1, {alpha:1}) ); I have 9 movieclips with pictures and dynamic text fields on different layers and trying fading those with tweenlite. The final banner should be a presentation of pictures and text effects on top of them. Thanks for help. Greensock rules!
  5. Hi, I just got my really green club plugins which are very nice. I am trying to implement this physics2DPlugin to my project. What is the best way to replace these dots with my own movieclip? Thanks for all answers! Heres the code from the example: import com.greensock.TweenLite; import com.greensock.plugins.TweenPlugin; import com.greensock.plugins.Physics2DPlugin; TweenPlugin.activate([Physics2DPlugin]); //activation is permanent in the SWF, so this line only needs to be run once. for (var i:int = 0; i < 60; i++) { tweenDot(getNewDot(), getRandom(0, 9.75)); } function tweenDot(dot:Shape, delay:Number):void { dot.x = 172; dot.y = 160; TweenLite.to(dot, 9.75, {physics2D:{velocity:getRandom(70, 370), angle:getRandom(245, 295), gravity:380}, delay:delay, onComplete:tweenDot, onCompleteParams:[dot, 0]}); } function getNewDot():Shape { var s:Shape = new Shape(); var green:uint = 0 | int(getRandom(80, 256)) << 8 | 0; s.graphics.beginFill(green, 1); s.graphics.drawCircle(0, 0, Math.random() * 8 + 5); s.graphics.endFill(); this.addChild(s); return s; } function getRandom(min:Number, max:Number):Number { return min + (Math.random() * (max - min)); }
×
×
  • Create New...