Jump to content
Search Community

G. Scott

Premium
  • Posts

    29
  • Joined

  • Last visited

Everything posted by G. Scott

  1. Thanks, Carl... I would agree with everything you said and appreciate your as sample. Coming from an as background as well, really miss it sometimes now that most of my projects are jQuery (thanks, Steve) although I am still picking up some Flash gigs here and there. I would also agree about sorting through larger objects. I definitely keep track of them by assigning an active class so that I'm not tweening anything more than I have to. Thinking about the example I gave with the buttons, I really should have thought that through more. I think most of the time I am inclined to tween objects that are already tweened, is when a user experience allows multiple bits of interaction, and I need to quickly be able to set everything back to square one. So if there are a few objects that have been clicked causing them to move, or change color, etc... I may just call a function to reset everything. Which may mean that some items in a class are changing back, while others may have never been changed to begin with. In this situation, I can achieve ALL of this with a simple TweenMax.allTo and POOF! Again, my not be the most efficiant use of resources, but there's something to be said for keeping the code to a minimum. Guess I'll continue on a case by case basis... but glad to hear your thoughts as well. Don't feel so guilty now!
  2. OK, I've wondered about this for the longest time and have decided to ask for your opinions... I find myself building a lot of user interface stuff (menus, etc) and I'm always at odds of how to handle this. For a super basic example, consider this: Suppose I have five menu items and I want to have the the active one at full opacity and the other four at half opacity. So when a menu item is clicked, it goes to full opacity and the one that was at full opacity fades to half opacity. Simple, right? In jQuery, I can assign an "activeButton" class to the one that has been clicked and then use that as the selector to fade it when another is clicked... and then of course un-assign that class to the old button and assign it to the new active button. OR (and here is where I think this may be cheating) I can tell ALL of the other buttons to fade, even though only one of them really needs to fade and be on my way! I've done it both ways and never noticed any difference or performance hit from tweening all of them... but I'm not sure if there are other ramifications. I used to do the same thing in AS at times, but honestly with jQuery, using not() makes it too easy: $('.menuButtons').not('#thisButton') Thoughts? If something is being asked to tween to X even though its already at X, does it take up much in the way of resources? So should I be losing sleep over this? I find myself "cheating" when I'm in a time crunch, but maybe there's no problem with it?
  3. Sorry guys, I had assumed that I was using v12 since I had just downloaded it from the GS homepage, but it was v11. I had no idea that the ability had been added in v12... so I'm a happy camper now... Thanks!
  4. Have tried to accomplish this many times but never succeeded and always too hurried to figure it out. Maybe someone can help. Basically, append multiple where one of the "multiples" was an array and the other was not (or even another array?) So something like this. The code below doesn't throw any errors, but it also doesn't do anything... timeline1.appendMultiple([new TweenMax([mc1, mc2, mc3, mc4], 1, {x:-100}), new TweenMax(mc5, 1, {alpha:1})]); SO basically while mc1 - mc4 are moving left, I want mc5 to fade in. Like having a TweenMax.allTo inside an appendMultiple. And if this is very doable and I just missed it somewhere, just blame it on th source code burned into my retinas... THANKS!
×
×
  • Create New...