Jump to content
Search Community

Carl last won the day on December 24 2023

Carl had the most liked content!

Carl

Moderators
  • Posts

    9,824
  • Joined

  • Last visited

  • Days Won

    546

Everything posted by Carl

  1. doh! Good catch GreenSock, Thanks much!
  2. if you go back to the throwProps page, you will see in the FAQ that GreenSock posted an fla that does iOS-style panel flicking that does not use ThrowProps. You could use that file to pull out that code that detects the velocity of the mouse and perhaps just use a regular TweenLite that flicks your menu in the proper direction for a set amount of time over a set amount of distance. That's probably the best place to start.
  3. this isn't related but you have a typo here: ball.entry = arrayBall.lenght; i don't see anything that really jumps out in your code as being a problem. The Flash Player in general isn't really the best at rendering long distance tweens if there isn't enough time or frames. I think you'll see that if you increase the duration or shorten the distance it will get smoother. Perhaps someone else will have some better tips.
  4. yes, i believe a better way would be to tell your TimelineLite to have: var john:TimelineLite = new TimelineLite({repeat:-1}); this will play the sequence over and over indefinitely. re-creating the same timeline over and over again on ENTER_FRAME is not going to work well.
  5. I doubt that you want to use ENTER_FRAME in that way. assuming your framerate is 30fps, a new TimelineLite is being generated 30 times a second. each new TimelineLite is competing with the one that was created 1/30th of a second ago so it never gets to run. ----- take all your TimelineLite code out of the animateCircles function and it should run fine, assuming you have imported the greensock classes properly. --- one more thing. to format your code properly in a post, select it and hit the "code" button. ---- does that make sense? if not, please clarify why you are using ENTER_FRAME
  6. Hi Metz, Flick-scrolling a long list of items as shown on the throwProps page requires very complicated calculations that take into consideration, the velocity of the flick, how far you will allow an object to be thrown and the minimum distance a of throw. ThrowProps makes it all very easy to do but it requires a Shockingly Green Club GreenSock Membership. Are you a shockingly green club greensock member? if yes, then someone would be able to copy some code out of the documentation and make your example work. if you are not a member with access to the ThrowPropsPlugin, the code provided would not work for you.
  7. great question. in your case event.target.content is an Array of all the content inside all the MP3 loaders inside your LoaderMax. so you are putting an Array inside notesArray. You can trace that the length of notesArray after load is 1. the content of an MP3Loader is a Sound() object. so you have an array of Sounds inside notesArray. so you could do: function completeHandler(event:LoaderEvent):void { notesArray.push(event.target.content); trace(notesArray); trace(notesArray.length); //play the first Sound object notesArray[0][0].play(); } ***EDIT*** just realized the main problem is you were using push(). you could really just do notesArray = event.target.content and you would be fine with notesArray[0] to get at the frist Sound object ***END EDIT*** you could also do it this way so that you have access to all the MP3Loader methods and properties function completeHandler(event:LoaderEvent):void { //getChildren() returns an Array of all the MP3Loaders notesArray = queue.getChildren(); //call playSound() on the first MP3Loader notesArray[0].playSound(); }
  8. You can use an onComplete callback to run your LiquidStage code when the tween is done: TweenLite.to(mc, 2, {x:450, onComplete:initLS}); function initLS():void{ //place your LiquidStage code here: }
  9. i think the problem is also that you are declaring your var sprite:Sprite=new Sprite(); inside the init() function. that means that sprite is only accessible inside that function. the function onMouseEvent is not aware of what sprite is. ---- try moving var sprite:Sprite=new Sprite(); outside of any methods
  10. you can use the unload() method to unload your content. you can also dispose() a loader to make it elegible for garbage collection give those a try http://www.greensock.com/as/docs/tween/ ... ml#unload()
  11. i guess you are rolling over and off the b2 many times and re-creating your tween each time. you could create your tween outside of your function var spin:TweenMax = new TweenMax.to(b2, 1, {rotation:360, repeat:-1, ease:"Linear.easeNone, paused:true}); then inside your button code just do spin.play();
  12. where you have the -1 is where the duration of the tween is set. when you set it to 3 that meant that the 360 degree rotation would take 3 seconds. what you want will look like this: TweenMax.to(b2, 1, {rotation:360, repeat:-1, ease:"Linear.easeNone});
  13. hi _maxxy, I think the easiest way of starting a sequence and another unique tween at the same time in a timeline would look something like this. //lets just use a bunch of tweens with funky times at the beginning: TIM.append(TweenMax.to(apple, .5, {x:100})) TIM.append(TweenMax.to(orange, 2.5, {y:100})) TIM.append(TweenMax.to(grape, 3.75, {x:300})) TIM.append(TweenMax.to(cherry, 12.51, {x:300})) TIM.append(TweenMax.to(plum, 6.33, {x:300})) //now to add a sequence and unique tween to start at the same time we need to know the placement in the timeline //we don't want to add all those durations together var insertionPoint:Number = TIM.duration; TIM.insertMultiple([TweenMax.from(mc1, 1, {x:600}), TweenMax.from(mc2, 1, {x:600}), TweenMax.from(mc3, 1, {x:600})], insertionPoint, TweenAlign.START, 2); TIM.insert(TweenMax.to(plum, 1, {rotation:90}), insertionPoint) Does this seem like an ok solution to your problem? if not we'll keep trying. best, carl
  14. it is difficult to troubleshoot this without seeing your liquidStage implementation (actionscript) and possibly how you are embedding your swf in the html. please post a simplified version of your files so that we can test. please do not post the com/greensock folder as that includes files only for paid members. your fla could just include a few movie clips and the LS code, just enough so that the issue is apparent and no other non-essential code. thanks. Carl
  15. Great questions! I struggled a bit with these myself when starting with TimelineLite/Max. Nope. appendMultiple wants a single array of tweens, so you can not pass in an array AND and additional twen. After you do your insertMultiple, you can then append() a single tween for mc4 and give it a negative offset value if you want it to start BEFORE the LAST tween in the previous insertMultiple() ends. ----- //1: TIM.appendMultiple(TweenMax.allFrom([z2,z3,z4], 0.75, {x:600, ease:Expo.easeOut}),-.5, TweenAlign.START, 0.1); //2: TIM.appendMultiple(TweenMax.allFrom([z2,z3,z4], 0.75, {x:600, ease:Expo.easeOut, delay:-0.5},0.1)); as you noticed these to lines do the same thing. some would prefer option 2 as there is less code. no wrong or right way. let me know if that helps or if you need more explanation. C
  16. if you were using a TweenLite/Max you could use an onUpdate callback to render your line each time the tween gets updated. this would be similar to an ENTER_FRAME event. but no, GreenSock doesn't have any drawing tools.
  17. do you mean have an object move along a curved path? you can use the BezierPlugin (see plugin explorer) or do you mean draw a curved line and have an object follow it? there are no drawing tools built into the GreenSock Tweening Platform, but you can look here to see what some people have done: viewtopic.php?f=1&t=4819&p=19462&hilit=bezierDemo#p19462 if you want to animate the creation of a curved line (as if it is being drawn) do some google searches for "AS3 Drawing API animation curves" or visit http://www.kglad.com/ and click on snippets and then curves
  18. i'm not an expert on requireWithRoot, but I believe you are mis-using it. in most of documentation that i'm familiar with requireWIthRoot is used when a child swf's loading progress is being used in determining the loading progress of its parent. also, it defines what the parent is and is not a true/false value. Again, I haven't used it myself, just sharing what I've read. From what you are describing, I think you can get away with not having a LoaderMax that contains an XMLLoader that creates your SWFLoader. Just using the XMLLoader on its own should be sufficient. from the XMLLoader docs: http://www.greensock.com/as/docs/tween/ ... oader.html I do agree it would be useful to know how to make it work with your existing set up. on further investigation, your XMLLoader's estimated bytes should include the size of the file AND any other loaders that it contains. maybe this will solve the issue. perhaps that 3000 is throwing things off.
  19. i just downloaded the latest public version and created a VideoLoader with no problem. can you provide a simple example that breaks with the latest version?
  20. Carl

    onUpDate

    i'm pretty certain onUpdate is always going to be locked to the ENTER_FRAME which will be tied to the framerate. i'm sure if there was a way to have quicker and more reliable onUpdates, it would be in there already. did you use onUpdateAfterEvent() with your Timer()? http://livedocs.adobe.com/flash/9.0/Act ... fterEvent()
  21. i think the tint is still happening, its just hard to see it applied to the white text. what you could do is make the gradient-rectangle its own symbol inside your button and only tint it all by itself so that the text doesn't get effected at all.
  22. create a reference to your tween: var blinkTween:TweenMax = TweenMax.to(tabTrack[ct], .3, {alpha:.2, repeat:-1, yoyo:true}); and then when you want it to stop do: blinkTween.pause(); and you can also send your tween to a particular time blinkTween.currentTime = .6
  23. thanks Ben. i just looked at my file again. had no idea that tint code was in there! that was already inside the button that you gave me and I must have overlooked it. to get the tint effect to work, just get rid of all the code inside the Button_mc symbol and alter your functions on frame 1 of the main timeline: function homeOver (event:MouseEvent): void { trace("homeOver"); TweenLite.to(home_btn.btn, .3, {y:-5, ease:Back.easeOut}); TweenMax.to(home_btn.btn, .3, {colorTransform:{tint:0xffff66, tintAmount:0.25}}); } function homeOut (event:MouseEvent): void { TweenLite.to(home_btn.btn, .3, {y:0, ease:Back.easeOut}); TweenMax.to(home_btn.btn, .3, {removeTint:true}); } edit since both tweens in both functions have the same duration you could also combine all the properties into ONE Tween TweenMax.to(home_btn.btn, .3, {y:-5, ease:Back.easeOut, colorTransform:{tint:0xffff66, tintAmount:0.25}});
  24. yeah, it was saved out as CS4. CS3 version attached
  25. the code you posted is definitely AS3 you need to make sure you have the as3 version of greensock and are publishing for AS3. go into com/greensock/TweenLite.as file and make sure it is the right version make sure that your com folder is in the same directory as your fla. Also also the reason publishing to AS2 made the errors go away is because AS2 does not have near the prowess for reporting compile-time errors. It lets a lot of things slide. It doesn't care that TweenLite isn't found.
×
×
  • Create New...