Jump to content
Search Community

mgason

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by mgason

  1. Hi, I have a movieclip that has nothing in frame 1, then this in frame 2 with mc "text_mc" TweenMax.to(text_mc, 1, {y:0, repeat:5, yoyo:true, onComplete:allDone}); function allDone():void{ trace("all done"); this.dispatchEvent(new Event("All Done")); this.gotoAndStop(1); } stop(); if from elsewhere I send that movieclip back to frame 1 and stop before the end of the tween, how do I stop the tween running. Although the text_mc is not there and does not move around the "All Done" event is still dispatched after 5 seconds. well I think this is the case? thanks Mark
  2. Hi, really hoping this is the last question, at least for today. presentation is tomorrow night. Thanks for the Bevel info, sorted and working now. can I put a split textfield sequence in a timelineMax? I tried this, it actually animates one character per second! I wanted to do this as my whole sequence is based on calling up timelineMax instances from and array by clicking a button thanks again mark var t3:TimelineMax = new TimelineMax({onReverseComplete:nextItem}); var stf:SplitTextField = new SplitTextField(slide4started_mc.started_mc.let_txt); for (var i:int = stf.textFields.length - 1; i > -1; i--) { t3.append(TweenMax.to(stf.textFields[i], 1, {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:Math.random() * 0.5, ease:Quad.easeIn, repeat:1, yoyo:true, repeatDelay:1.2})); }
  3. Hi, I am applying a bevel filter with TweenMax, it does not seem to do anything, no errors. Curiously though neither does a bevel filter applied in the flash IDE. I broke my text apart in case that would cause it, no change. am I expecting too much of flash's bevel abilities? attached is a file with 2 mc's one with bevel applied in tweenMax, one in flash filters panel. any ideas? import com.greensock.TweenMax; import com.greensock.TimelineMax; import com.greensock.easing.*; import com.greensock.plugins.*; TweenPlugin.activate([bevelFilterPlugin]); TweenMax.to(questMark_mc, 5, {bevelFilter:{blurX:10, blurY:10, strength:3, distance:10}});
  4. I think this is a better method? It works for a start!! I store the timelines in an Array, keep a track of the current one. (just 2 in this sample) When either button (previous/next) is clicked the current timeline reverses. For all timelines when reverse is complete it calls a function that checks a direction var to see if next or previous was clicked. It then plays the previous or next timeline in the array. Any opinions on my method? Am I making full use of TimelineMax's abilities, or can it make this even simpler? import com.greensock.TweenMax; import com.greensock.TimelineMax; import com.greensock.easing.*; var sW:int = stage.stageHeight; var sH:int = stage.stageHeight; var forward:Boolean;//do we want next or previous slide/timeline var currentTL:int;//position in timeline array for current timeline var tLArray:Array = new Array(); var mcN:MovieClip = slide1Why_mc.questMark_mc; next_btn.addEventListener(MouseEvent.CLICK, nextBtn); prev_btn.addEventListener(MouseEvent.CLICK, prevBtn); var t0:TimelineMax = new TimelineMax({onCompleteParams:[mcN.width, mcN.height, mcN.x, mcN.y], onComplete:reset, onReverseComplete:nextItem}); t0.append(TweenMax.from(slide1Why_mc.why_mc, 1, {autoAlpha:0, y:-200, ease:Sine.easeOut})); t0.append(TweenMax.from(slide1Why_mc.tween_mc, 1, {autoAlpha:0, x:sW, ease:Sine.easeOut}), -0.5); t0.append(TweenMax.from(slide1Why_mc.with_mc, 1, {autoAlpha:0, y:sH, ease:Sine.easeOut}), -0.5); t0.append(TweenMax.from(slide1Why_mc.code_mc, 1, {autoAlpha:0, x:-300, ease:Sine.easeOut}), -0.5); t0.append(TweenMax.from(mcN, 0.5, {autoAlpha:0, rotationX:-90, ease:Sine.easeOut}), -0.3); t0.pause(); tLArray.push(t0); var t1:TimelineMax = new TimelineMax({onReverseComplete:nextItem}); t1.append(TweenMax.to(slide2Why_mc.head1Mask_mc, 0.5, {width:700, ease:Sine.easeOut})); t1.append(TweenMax.to(slide2Why_mc.head1Point1Mask_mc, 0.5, {width:700, ease:Sine.easeOut}), 0.2); t1.append(TweenMax.to(slide2Why_mc.head2Mask_mc, 0.5, {width:700, ease:Sine.easeOut}), 0.5); t1.append(TweenMax.to(slide2Why_mc.head2Point1Mask_mc, 0.5, {width:700, ease:Sine.easeOut}), 0.2); t1.append(TweenMax.to(slide2Why_mc.head3Mask_mc, 0.5, {width:700, ease:Sine.easeOut}), 0.5); t1.append(TweenMax.to(slide2Why_mc.head3Point1Mask_mc, 0.5, {width:700, ease:Sine.easeOut}), 0.2); t1.append(TweenMax.to(slide2Why_mc.head3Point2Mask_mc, 0.5, {width:700, ease:Sine.easeOut}), 0.2); t1.append(TweenMax.to(slide2Why_mc.head3Point3Mask_mc, 0.5, {width:700, ease:Sine.easeOut}), 0.2); t1.pause(); tLArray.push(t1); init(); function reset(w:Number, h:Number, X:Number, Y:Number){ mcN.transform.matrix3D = null; mcN.width = w; mcN.height = h; mcN.x = X; mcN.y = Y; } function prevBtn(e:MouseEvent):void{ if(currentTL > 0){ tLArray[currentTL].reverse(); forward = false; } } function nextBtn(e:MouseEvent):void{ if(currentTL < tLArray.length -1){ tLArray[currentTL].reverse(); forward = true; } } function nextItem():void{ if(!forward){ //trace("reverse"); currentTL = currentTL - 1; }else{ //trace("forward"); currentTL = currentTL + 1; } tLArray[currentTL].play(); } function init():void{ t0.play(); currentTL = 0; }
  5. Hi, first thanks for all of your help. I am not sure if I am on the right track, before I code much more let me ask how you would go about this. say I have a series of timelineMax's, tl1, tl2, tl3 etc, and I want to have a previous and next button. the previous button should cause the current timeline to reverse and when the reverse is complete make the previous timeline play. the next button should cause the current timeline to reverse and when the reverse is complete make the next timeline play. Is there a smart way to do this? Should I be nesting the timelines inside a main one? The method I have tried is to have each timeline in a function. My functions are in an Array. A var keeps tack of the function in use when I click next it reverses the current timeline, the onReverseComplete then calls the function with the next timeline. same deal with previous Here is my code, and the FLA is attached This traces slide2 function has been called after reverse is complete but nothing appears? import com.greensock.TweenMax; import com.greensock.TimelineMax; import com.greensock.easing.*; var sW:int = stage.stageHeight; var sH:int = stage.stageHeight; var Pos:int = -1; var funcArray = new Array(slide1, slide2); var mcN:MovieClip = slide1Why_mc.questMark_mc; var oldTimeline:TimelineMax; var nextFunc:Function; var timeline1:TimelineMax = new TimelineMax({onCompleteParams:[mcN.width, mcN.height, mcN.x, mcN.y], onComplete:reset, onReverseComplete:revComplete}); var timeline2:TimelineMax = new TimelineMax(); next_btn.addEventListener(MouseEvent.CLICK, nextItem); prev_btn.addEventListener(MouseEvent.CLICK, prevItem); function slide1():void{ oldTimeline = timeline1; timeline1.append(TweenMax.from(slide1Why_mc.why_mc, 1, {autoAlpha:0, y:-200, ease:Sine.easeOut})); timeline1.append(TweenMax.from(slide1Why_mc.tween_mc, 1, {autoAlpha:0, x:sW, ease:Sine.easeOut}), -0.5); timeline1.append(TweenMax.from(slide1Why_mc.with_mc, 1, {autoAlpha:0, y:sH, ease:Sine.easeOut}), -0.5); timeline1.append(TweenMax.from(slide1Why_mc.code_mc, 1, {autoAlpha:0, x:-300, ease:Sine.easeOut}), -0.5); timeline1.append(TweenMax.from(mcN, 0.5, {autoAlpha:0, rotationX:-90, ease:Sine.easeOut}), -0.3); } function reset(w:Number, h:Number, X:Number, Y:Number){ mcN.transform.matrix3D = null; trace(h); mcN.width = w; mcN.height = h; mcN.x = X; mcN.y = Y; Pos = Pos + 1; } function slide2():void{ trace("slide2 called"); oldTimeline = timeline2; timeline2.append(TweenMax.to(slide2Why_mc.head1Mask_mc, 1, {width:700, ease:Sine.easeOut})); timeline2.append(TweenMax.to(slide2Why_mc.head1Point1Mask_mc, 1, {width:700, ease:Sine.easeOut}), 0.5); timeline2.append(TweenMax.to(slide2Why_mc.head2Mask_mc, 1, {width:700, ease:Sine.easeOut}), 1); timeline2.append(TweenMax.to(slide2Why_mc.head2Point1Mask_mc, 1, {width:700, ease:Sine.easeOut}), 0.5); timeline2.append(TweenMax.to(slide2Why_mc.head3Mask_mc, 1, {width:700, ease:Sine.easeOut}), 1); timeline2.append(TweenMax.to(slide2Why_mc.head3Point1Mask_mc, 1, {width:700, ease:Sine.easeOut}), 0.5); timeline2.append(TweenMax.to(slide2Why_mc.head3Point2Mask_mc, 1, {width:700, ease:Sine.easeOut}), 0.5); timeline2.append(TweenMax.to(slide2Why_mc.head3Point3Mask_mc, 1, {width:700, ease:Sine.easeOut}), 0.5); } function prevItem(e:MouseEvent):void{ if(Pos > 0){ oldTimeline.reverse(); Pos = Pos - 1; } } function nextItem(e:MouseEvent):void{ if(Pos < funcArray.length -1){ oldTimeline.reverse(); Pos = Pos + 1; } } function revComplete():void{ trace("called pos " + Pos); funcArray[Pos](); }
  6. Hi, Mark Gason here, I wrote to you a little while ago about the presentation I am giving on your classes. Would you be willing to let me show the circle tweening or would you prefer to keep it a secret until its done?
  7. Hi, when you rotate something around an axis using the new 3d in player 10 it applies a blur to the mc automatically. I have a mc which I tween like this TweenMax.from(questMark_mc, 1, {autoAlpha:0, rotationX:-180, ease:Sine.easeOut}); When the mc finishes tweening it looks awful, this I realize is not a fault of TweenMax. Is there any smart way around this? See it here http://gasolicious.com/flashstuff/blurProblem.html the basic example FLA is attached mark
  8. Hi, I was building a custom ease with the custom ease builder and was thinking it would be really nice if you could first select one of the prebuilt eases then modify from there. Would make an already awesome tool even cooler! Mark
  9. Thanks for those, I will have a play. I am doing draw a rectangle with tweenmax. Can you just tween a number? As in say tween from 0 to 100 and feed that value to a textbox? If so how? thanks Mark
  10. Hi, I am giving a presentation on tweening with TweenMax and TimelineMax at the January meeting of the Flash user group in Minneapolis. This will be for about an hour. The audience has wildly varying levels of Actionscript skill. I intend to cover the basics, move an object around, sequence some tweens etc. I will show them around the handy interactive demo's on the site. I have also been looking through the forum posts for interesting code, certainly learned a few things doing that So I have the basics covered. I am writing to ask if anyone has any ideas for beyond the basics. Are there any cool things that people regularly miss? For instance everyone immediately thinks tween a movieclip around on stage, but you can tween anything. Any ideas on things that may not immediately leap to mind for tweening, any unusual or really cool uses for these tweening goodies? I don't necessarily need code (although if you have some already that you want to share I won't say no) Just suggestions of things to mention to mention towards the end, just to say "OK you now can tween a position, tween a color etc, but did you think you could also tween a ????" So everyone I hope you have some time to share your thoughts. I am speaking on January 20th. thanks Mark
  11. Thanks, you rock, something I tell all my Flash using pals. It still amazes me that you develop the tweening platform, work, and still find time to answer most of the posts on this forum Mark
  12. It seems to me that code and nothing else should draw a rectangle? No movie clips etc required in the FLA just this code. When I run it I get this error "TypeError: Error #1009: Cannot access a property or method of a null object reference." at com.greensock::TimelineLite/insert() at com.greensock::TimelineLite/insertMultiple() at com.greensock::TimelineLite() at drawwithtweenmax_fla::MainTimeline/frame1() debug takes me to line 329 in TimelineLite.as tween.cachedStartTime = Number(timeOrLabel) + tween.delay;
  13. Hi, I came across this post and wanted to play with the concept viewtopic.php?f=1&t=287 when I try to run the code supplied I get this error 1119: Access of possibly undefined property ALIGN_SEQUENCE through a reference with static type Class. I am running V11 and bonus items for convenience, here is the code just like the post I mentioned I have not changed anything except gs to com.greensock thanks mark import flash.display.*; import com.greensock.*; import com.greensock.easing.*; var line:Shape = new Shape(); line.graphics.lineStyle(10, 0xFFD700, 1, false, LineScaleMode.VERTICAL, CapsStyle.NONE, JointStyle.MITER, 10); this.addChild(line); line.x = 50; line.y = 50; var drawer:Sprite = new Sprite(); this.addChild(drawer); var sequence:TimelineLite = new TimelineLite({tweens:[ [drawer, 0.1, {x:200, ease:Quad.easeOut, onUpdate:drawLine}], [drawer, 0.1, {y:100, ease:Quad.easeOut, onUpdate:drawLine}], [drawer, 0.1, {x:0, ease:Quad.easeOut, onUpdate:drawLine}], [drawer, 0.1, {y:0, ease:Quad.easeOut, onUpdate:drawLine}]], align:TimelineLite.ALIGN_SEQUENCE}); function drawLine():void { line.graphics.lineTo(drawer.x, drawer.y); }
  14. Thanks, I did have flash.geom.Point, forgot to show that. I am a member, I did not have the plugins activated. So now I have it working, my mc rotates around the correct point but I have a new problem. The mc is what appears to be a cutout from another larger mc (sheet of paper). basically, larger mc has a hole in it and is on a lower layer. small mc on the top layer, is the shape of that hole and drops away. The problem is when it rotates around its bottom left corner at the start of the animation it appears to be below the big mc. Once it is done animating is appears on top. How do I fix that? I need the tween to be on top of everything. thanks mark
  15. Hi, I have dozens of working tweens in my project. I have this code, I know the function runs because the glow and drop shadow appear. When my code did not work I copied and pasted from the "widget" on greensock just to be sure my syntax was right. It still does not work, no scaling around the point? any ideas Mark import com.greensock.*; import com.greensock.easing.*; private function cutout(){ TweenMax.to(about_mc.page_mc.nuCutout_mc, 0.1, {dropShadowFilter:{color:0x000000, alpha:0.5, blurX:2, blurY:2, distance:2, delay:0.5}}); TweenMax.to(about_mc.page_mc.nuCutout_mc, 0.1, {glowFilter:{color:0x000000, alpha:0.5, blurX:2, blurY:2, delay:0.5}}); TweenMax.to(about_mc.page_mc.nuCutout_mc, 1, {transformAroundPoint:{point:new Point(181,257), scaleX:0.5, scaleY:0.5}, ease:Elastic.easeOut}); }
  16. Hi, this probably requires a reply from Jack himself. I did email but got no reply. I want to buy transform manager, I am entitled to a discount I believe as a greensock member. I have a new email and new computer. seems one of the things that did not survive is communications from Jack. My bad I know. I can not find a record in paypal either for some reason. I would have used a credit card. What do I need to supply to get access to the bonus items like liquid stage again, and to receive my discount on transform manager? I could check my credit card, what would the bill appear as? Thanks Mark Gason
  17. Hi, I am using liquidstage to align a mc to the bottom of the stage and keep it the full width of the browser. I have done this before, for some reason only the top part of my mc is showing when in the browser. what am I doing wrong? I am attaching a very simple FLA with the problem, if someone has time please publish it and see what happens. thanks mark import gs.utils.LiquidStage;///import liquid stage class import flash.events.*; LiquidStage.init(this.stage, 960, 600, 960, 600); LiquidStage.pinObject(lowerLogo_mc, LiquidStage.BOTTOM_LEFT); LiquidStage.stretchObject(lowerLogo_mc, LiquidStage.BOTTOM_LEFT, LiquidStage.BOTTOM_RIGHT, null, true); stop();
×
×
  • Create New...