Jump to content
Search Community

Hippiesvin

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by Hippiesvin

  1. Thanks Carl. Have used many well spended hours on snorkl.tv through the years, so thanks for what you've done there too The use of {self} was new to me, is there any documentation on that way of doing it?
  2. Hi I wonder if there is a way to make a call onStart with the element getting animated. /HippieSvin var arr:Array =[classWithOtherStuff,classWithOtherStuff,classWithOtherStuff]; var tm:TimelineMax = new TimelineMax(); tm.staggerFrom(arr, 0.5, { delay:0, y:'200', ease:Quad.easeOut, onStart:ElementInArr.doSomething}, 0.1);
  3. Hi Carl Thanks for reply. U are absolutely right about the version. Example version - error TweenMax.version : 11.698 TimelineMax.version : 1.698 New version - works perfectly TweenMax.version : 12.0.2 TimelineMax.version : 12.0.2 I really don't know what have went wrong here. I have been updating on let's say montly basis, mainly from rightside of greensock. I have now triblechecked if there should be a mismatch in the zip-versions to download between as3 rightside and gsap leftside leading to github. I haven't found any mismatch so that leaves me with a strong need for coffee and a great deal of confusion... So.... Sorry for taking your time, thanks for the great work and I'll try to pull myself together.....
  4. I would have attached a nice example but I can't get the attach function to work, that goes for crome and IE. Have tried both jpg's and zipfiles
  5. hi Greensock A few questions reagrding killAll() 1) Where did the last parameter go? In Flash : killAll(complete:Boolean = false, tweens:Boolean = true, delayedCalls:Boolean = true):void vs. Docs : killAll(complete:Boolean = false, tweens:Boolean = true, delayedCalls:Boolean = true, timelines:Boolean = true):void 2) TimelineMaxs onComplete fires after TweenMax.killAll();??? package { import flash.display.Sprite; import com.greensock.TweenMax; import com.greensock.TimelineMax; import com.greensock.plugins.*; import com.greensock.easing.*; import com.greensock.events.TweenEvent; TweenPlugin.activate([ScalePlugin]); import flash.display.MovieClip; public class Main extends Sprite { public function Main() { // constructor code super(); Create(); } private function Create() { var arr:Array = new Array(); var Time:Number=2; for (var i:int=0; i<10; i++) { var m:MovieClip = new mc(); this.addChild(m); m.x = 40+(25*i); m.y=50; arr.push(m); } // solo tween var TM:MovieClip = new mc(); this.addChild; TM.x=40; TM.y=100; TweenMax.to(TM,6,{scale:2, ease:Linear.easeNone, onStartListener:ScaleTM, onComplete:CompleteTM }); // timeline var TL:TimelineMax = new TimelineMax({ onComplete:CompleteTL }); TL.insertMultiple(TweenMax.allTo(arr, Time, {scale:2, ease:Linear.easeNone, onStartListener:ScaleTL }, Time-0.5), 0); // delayed kill TweenMax.delayedCall(4,Kill); } private function ScaleTM(e:TweenEvent): void { trace('onStartListener: ScaleTM'); } private function CompleteTM() { trace('CompleteTM'); } private function ScaleTL(e:TweenEvent): void { trace('onStartListener: ScaleTL'); } private function CompleteTL() { trace('CompleteTL'); } private function Kill() { trace('Kill'); TweenMax.killAll( } } } trace is:onStartListener: ScaleTM onStartListener: ScaleTL onStartListener: ScaleTL onStartListener: ScaleTL Kill CompleteTL After killAll: As U can see TimelineMax onComplete fires but TweenMax onComplete dosn't
  6. Hi Greensock 1. Why is 2 movieclips both rotated from -90 to 190 going cw using TweenMax.to and ccw using TweenMax.from? 2. Is there a way to make .from go CW in this example? note: both going cw when var rotateTo <=180 in example below //HippieSvin import com.greensock.easing.*; import com.greensock.plugins.*; import com.greensock.TweenMax; var rotateTo:Number = 190; var rotateFrom:Number = -90; // CCW // RED : TM animating FROM -90 to 190 var c1:MovieClip = new MovieClip(); this.addChild(c1); c1.x = 275; c1.y = 200; c1.rotation=rotateTo; var red:MovieClip = new boxRed(); c1.addChild(red); red.x=-50; TweenMax.from(c1, 3, { delay:1.0, rotation:rotateFrom, ease:Quad.easeInOut }); // CW // GREEN : TM animating TO 190 from -90 : this goes CW var c2:MovieClip = new MovieClip(); this.addChild(c2); c2.x = 275; c2.y = 200; c2.rotation=rotateFrom; var green:MovieClip = new boxGreen(); c2.addChild(green); green.x=-50; TweenMax.to(c2, 3, { delay:1.0, rotation:rotateTo, ease:Quad.easeInOut });
  7. Hi Jack Have to re-compile an as2-project from last year where I spoke to you about swf losing it's _root when reloading I believe it was. The problem was fixed by using TweenMax.jumpStart(_root); I can't seem to find this method anymore. Have U adressed this issue so method is no longer needed? Best regards HippieSvin
  8. Downloaded latest version with the bugfix - works perfect - Thanks
  9. Hi Jack - U R hard to keep up with Thought 5.3 was gone but found it - another good reason never to clean up download folder Ok I thought change was made in TweenMax because of what I found described above. Here is exact same project as before but all classes are 5.3, downloaded 16/5. http://dl.dropbox.co...eteListener.zip
  10. Hi Jack Her is a link to the projectfiles for my latest post about error in onCompleteListener but this one also throws error as described above. I've just changed TweenMax file to beta 5.3 from 5.5. As I see it the only difference in protected static function _getChildrenOf(... is that in 5.5 U added: if (timeline == null) { return []; } Both files are found in classes folder. All other files are downloaded as 5.5. You can at the same time see onCompletelistener error. So 2 for 1 http://dl.dropbox.co...eteListener.zip // HippieSvin
  11. Hi Jack Using onCompleteListener like code below throws error. Am I doing something wrong? Best regards HippieSvin ... by the way, using Cromebrowser, tried to attach the zippet .fla several times but got Error This upload failed... CODE import com.greensock.easing.*; import com.greensock.plugins.*; import com.greensock.TweenMax; import com.greensock.TimelineMax; import com.greensock.events.TweenEvent; var mc:MovieClip = new TestMC(); this.addChild(mc); trace(TweenMax.version); // TRACES 12 /* * VERSION: 12.0 beta 5.5 * DATE: 2012-05-25 */ // NO ANIMATION + THROWS ERROR TweenMax.from(mc, 1.0, {delay:0.5, x:"300", ease:Back.easeOut, onCompleteListener:test}); // WORKING //TweenMax.from(mc, 1.0, {delay:0.5, x:"300", ease:Back.easeOut, onComplete:test}); function test(e:TweenEvent=null):void { trace("test"); } ERROR ReferenceError: Error #1069: Property split not found on builtin.as$0.MethodClosure and there is no default value. at com.greensock::TweenLite/_initProps() at com.greensock::TweenLite/_init() at com.greensock::TweenMax/render() at com.greensock::TweenLite() at com.greensock::TweenMax() at com.greensock::TweenMax$/from() at TEST_OnCompleteListener_fla::MainTimeline/frame1()
  12. Hi Jack - sorry for late reply, been away for a few days. Yes your TweenMax file did the job - what happened? My File: * VERSION: 12.0 beta 5.3 * DATE: 2012-05-10 Thanks
  13. Just a comment for those who are new to using blitmask. Carl Schoof at snorkltv made this great introduction (one of many) which helped me alot. http://www.snorkl.tv/2011/10/use-blitmasks-wrap-feature-for-easy-bitmap-scrolling-and-looping/ Sorry for interrupting post. Keep coding // HippieSvin
  14. Hi Greensock I'm working on a project where it's essential that all things are loaded correctly. If they are not I clean up my fla and in that process I call killAll(); and get following error: CleanUp -> ERROR TweenMax -> TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock::TweenMax$/_getChildrenOf() at com.greensock::TweenMax$/getAllTweens() at com.greensock::TweenMax$/killAll() Additional traces (traced just before error thrown): TweenMax : [class TweenMax] TweenMax.getAllTweens.length : 1 Error is ONLY thrown when no Tweens has been running. Is there anyway I can avoid this error? ... and what causes it? Can I make some kind of an if (TweenMax Contains Tweens) ...-> killAll()...? ... and by the way...CONGRATS ON VERS. 12 Best regards HippieSvin
  15. your syntax is wrong. also a suggestion, as I see it mask and masked objects are moved the same, so a good idea maybe would be to put those into a container, push the container into an array and then animate that. Try this // SETUP =============================== // make an array var arrMonth:Array = new Array(); // Do something like this to all your mask/masked pairs var monthCon:MovieClip = this.createEmptyMovieClip("monthCon",this.getNextHighestDepth()); monthCon.attachMovieClip("cal_januar","cal_januar",monthCon.getNextHighestDepth()); monthCon.attachMovieClip("cal_januar_mask","cal_januar_mask",monthCon.getNextHighestDepth()); // push container into array arrMonth.push(monthCon); // ANIMATION =============================== import com.greensock.*; import com.greensock.easing.*; TweenMax.from(bg1, 1, {_alpha:0, blurFilter:{blurX:20}, delay:0.5})); var myTimeline:TimelineMax = new TimelineMax({onComplete:step1complete}); myTimeline.insertMultiple( TweenMax.allFrom(arrMonth, 0.8, {_alpha:0, _x:750, ease:Back.easeOut}, 0.1), 0.0); // objects, time, { props }, stagger (delay between each object in array), delay (before timelinemax starts) function step1complete():Void { trace("Step1Complete"); }
  16. Hi Greensock Is there any way to determine the type of object and/or what specific object just completed it's tween using TimelineMax? I'm doing a project where a mobilephone CPU has to run a normal widescreen and I want to test-tweak the animating mc._quality- and tf.antialias -settings while they are animating to tune my animations. var arr:Array = [tf1, tf2, mc1, tf3, mc2]; // textFields and MovieClips var TM:TimelineMax = new TimelineMax(); TM.insertMultiple( TweenMax.allTo(arr, 0.3, {autoAlpha:100, ease:Quad.easeIn, onStart:lowFi, onStartParams:[this], onComplete:hiFi, onCompleteParams:[this]}, 0.1), 0); function lowFi(o:Object) { // determine what kind of object (textfield, movieclip) & what specific object starts to animate } function hiFi(o:Object) { // determine what kind of object (textfield, movieclip) & what specific object just completed }
  17. Works like a charm - thanx alot
  18. You're proberly right - Thanks for taking you time Flex project attached.
  19. Hi Greensock I have come across something strange in as2 version of tweenMax. I have an flexapplication where I load & unload a .swf LoadImage.swf : just load an image LoadImage1.swf : just load the same image and makes a simple tween. LoadImage = no problem load/unload LoadImage1 = which contains tweenmax, .. 1. load: works fine, 2. load: tween is missing but image showing, 3 load: well... app kind of explodes... Any idea why? I have attached example. Just open Toolkit.html in browser, try to load/unload and then change filename to LoadImage1.swf I can add a perhaps useless information to this, but it might be a hint. What got me into making this test example was that I got following warning in another project also regarding to load/unload swf's. TweenMax threw this warning : "Warning: 'com' has no property 'onEnterFrame'" Best regards HippieSvin
  20. Hi .. and merry christmas First of all - I've never used TweenLite with as2, so bear with me if I'm filling you with nonsense I'm sure someone will correct me if I'm wrong. Second of all - update to as3, you won't regret it I believe this will solve your problem: TweenLite.to(_root.btn_work, 2, {_x:328, _y:328, ease:Expo.easeInOut}); TweenLite.to(_root.btn_work, 2, {delay:2, autoAlpha:100, ease:Quad.easeIn, onComplete:YourFunctionOne}) function YourFunctionOne() { ... } //--------------- If your _root.btn_work._alpha is = 0 you could just do like this: _root.btn_work._x = 328; _root.btn_work._y = 328; TweenLite.to(_root.btn_work, 2, {autoAlpha:100, ease:Quad.easeIn, onComplete:YourFunctionTwo, onCompleteParams:["hello"] }) function YourFunctionTwo(s:String) { trace(s); // hello } I hope that made sense
  21. Hi Jack ... and merry Christmas I can't figure out how to change "onStart" and "onComplete" on my TimelineMax object when I reverse it. My problem simplified: var TM:TimelineMax; function show() { TM = new TimelineMax({onStart:merry, onComplete:hide); TM.insertMultiple( TweenMax.allTo(AnArray, 1.0, {autoAlpha:1, ease:Quad.easeIn}, 0.2), 0); } function hide() { TM({onStart:christmas, onComplete:show}); TM.reverse(); } function merry() { ... } function christmas() { ... } show(); // start Entering "hide" -function throws this error: TypeError: Error #1006: value is not a function. at myFla::hide() at Function/http://adobe.com/AS3/2006/builtin::apply() at com.greensock.core::TweenCore/complete() at com.greensock::TimelineMax/complete() at com.greensock::TimelineMax/renderTime() at com.greensock.core::SimpleTimeline/renderTime() at com.greensock::TweenLite$/updateAll()
  22. Hi jack A quick question. In tweenGroup I could call a function when the group was onComplete like this myTweengroup.onComplete = myFunction; How do I do that withTimelineMax? Just wondering. Any particular reason for having TimelineMax's "timeline" running from declareration point and not from when you tell it to play()? In the following example animation will begin with mcB, while mcA just jumps into place. I know I can solve this like this var TM:TimelineMax = new TimelineMax(); TM.stop(); import flash.display.*; import com.greensock.TimelineMax; import com.greensock.TweenMax; import com.greensock.easing.*; var mcA:MovieClip = new mc1(); this.addChild(mcA); var mcB:MovieClip = new mc2(); this.addChild(mcB); mcA.x = 50; mcB.x = 150; var TM:TimelineMax = new TimelineMax(); function animate() { TM.append(new TweenMax(mcA, 1, {y:50, ease:Back.easeOut})); TM.append(new TweenMax(mcB, 1, {y:50, ease:Back.easeOut})); TM.play(); } setTimeout(animate,1000);
  23. Okay I was using a downloaded version of TweenMax (2.34) from September that didn't contain the TweenGroup.as document, so that explains a lot, so I've got your code up and running BUT... it's still not drawing a perfect rectangle exactly, just as my own piece of code (referred to as "a little unstabile" in my first post). See attached .jpg It dosn't matter if I set time to 1 sec or remove all easing, it's like the next tween in the sequence is starting a little before the previous one has finished, causing the lines to be a little shattered? Am I right? Am I pushing my luck trying to animate drawing with TweenMax? thanks for taking time
  24. Hi it's me again doing like this: var sequence:TweenGroup = new TweenGroup(); sequence = [ {target:drawer, time:0.1, x:200, ease:Quadratic.easeOut, onUpdate:drawLine}, {target:drawer, time:0.1, y:100, ease:Quadratic.easeOut, onUpdate:drawLine}, {target:drawer, time:0.1, x:0, ease:Quadratic.easeOut, onUpdate:drawLine}, {target:drawer, time:0.1, y:0, ease:Quadratic.easeOut, onUpdate:drawLine}], TweenLite, TweenGroup.ALIGN_SEQUENCE); Brings down the errors to 1, strictmode or not. the problem is in this line: {target:drawer, time:0.1, y:0, ease:Quadratic.easeOut, onUpdate:drawLine}], TweenLite, TweenGroup.ALIGN_SEQUENCE);
×
×
  • Create New...