Jump to content
Search Community

DigitalOne

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by DigitalOne

  1. Not running into problems. I have an intro that I'm trying to sync. Right now, it's sync'd to an audio track via Flash's timeline "stream" option Haven't tried syncing audio using your classes before. I'll try by appropriate seconds, delays, etc.
  2. Hi all, Is there any way to sync any of the Tween/TimelineMax/Lites to a loaded audio track? By that I mean the animation matches the audio flow like within the Flash IDE when you set the audio track in the timeline to sync to "stream" Thank you
  3. Thank you for clearing that up. That makes a little more sense. I'm not going to change the class path, way too much work...lol Besides, in the event that someone does have to review/use my code, I'd like to stick to something everyone understands. Yeah I noticed you changed the class path from what it used to be. It's kinda funny because before I ever really knew what greensock was, in all my older fla files that were either downloaded or tutorials, I noticed the "import .gs" directive. I knew at the time it was a tweening class, but I'm kicking myself for not using it sooner.
  4. Hey all, I have all my Actionscript classes in a directory called "AS3 Classes", which I've pointed to in the Flash IDE. All the greensock stuff resides in "AS3 Classes --->com --->greensock" I'd like to change the name of the com folder, or get rid of it completely. However, the TweenMax/Lite Timeline, etc files all seem contain the import path starting with "com". If I change the name of the com folder, then I have to go into all the greensock files and change it there as well?? Is there any easier way to go about this? As a side note, I'm a little confused about this "com" business. I read that people do this in order to avoid class conflicts on the server/internet... But none the actual .as files are ever uploaded to the server anyway, they just reside locally on the users system...so why the naming convention?
  5. I'm going un-nest my functions and see if that allows me to reference the timeline constructor...Thanks again for your help.
  6. Ok, I understand the thing about nested functions expiring, so then why does TweenLite.from(mcPage, 1, {y:200, autoAlpha:0, ease:Back.easeOut}); still work in a nested function but animTimline.play() will not? I declared the timeline constructor outside of any functions... You got me thinking, why am I nesting the function? It can still be called without being nested.... btw Jack, great vid on timelineMax/Lite. It taught me a couple things I didn't realize about timeline
  7. HI all, I have an external movie that I load into may main. When external swf is done loading, it gets a movie clip(mcPage) associated with it so I can manipulate the external swf elsewhere. But something strange is going on. When i try to animate the movie clip that the external swf sits in, I can only do it via TweenLite.from(mcPage, 1, {y:200, autoAlpha:0, ease:Back.easeOut}); If I try to use a timeline setup, nothing happens, no errors, nothing. here is my loader: var pageLoader:Loader=new Loader(); pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, pageLoaded); var mcPage:MovieClip; function pageLoaded(e:Event):void { mcPage = pageLoader.content as MovieClip; } here is how I now animate "mcPage": function pageAnimIn(e:MouseEvent):void { mcPage.visible = true; //mcPage will only animate after it is loaded. pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, delayAnim); function delayAnim(e:Event):void { pageLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, delayAnim); TweenLite.from(mcPage, 1, {y:200, autoAlpha:0, ease:Back.easeOut}); } } function pageAnimOut(e:MouseEvent):void { TweenLite.to(mcPage, 1, {y:200, autoAlpha:0, ease:Back.easeIn}) } Here how I want to animate mcPage: var pageAnimTimeline:TimelineMax = new TimelineMax({paused:true}); pageAnimTimeline.append(TweenMax.from(mcPage, 1, {y:200, autoAlpha:0, ease:Back.easeOut})); function pageAnimIn(e:MouseEvent):void { mcPage.visible = true; //mcPage will only animate after it is loaded. pageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, delayAnim); function delayAnim(e:Event):void { pageLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, delayAnim); pageAnimTimeline.play(); } } function pageAnimOut(e:MouseEvent):void { [b]pageAnimTimeline.reverse();[/b] } Well, I'm not sure if it really matters, but I'm definitely curious as to why.... any ideas?
  8. Why is "-5" written as a string? I noticed a significant difference between y: "-5" and y: -5 when i run the animation... Just trying to figure out the purpose here.
  9. Ok...thank you. I think the issue is with me and how I perceive objects/classes/methods as they relate to OOP. So when you create a var MyTween:TweenLite that is an object, correct? and new TweenLite is the constructor? Ok, I realize I'm getting off topic now...sorry. I went back and re-read your responses to me. I realize that variables declared within functions will expire (get garbage collected) after the function runs. However, when declared at the top level, i.e. not within ANY function, the variable will persist and cannot be garbage collected.
  10. Ok, bear with me here. Neither myTimeline.append( new TweenLite(mc, 1, {y:200, ease:Back.easeIn})); or myTimeline.append(TweenLite.from(box1, 1, {x:0, ease:Back.easeIn}) ); uses a variable to store the tween. So how is the user being shielded from a variable being gc'd when no variable is present? Again, not trying to be difficult, just trying to understand.
  11. Thank you Jack for your reply, So, you're saying that by using myTimeline.append( new TimelineLite(mc, 1, {x:100}) ); a variable is being created that can be garbage collected. Other than declaring a new timeline object, which has to be done rather using static methods or not, where is the variable declaration in the above code? Is the variable created as some unseen reference for the compiler because of "new" ? Sorry, I'm just trying to get my head around some of the aspects of OOP. Thank you for taking the time to respond. -D
  12. First of all, I would like to commend Jack on a great set of classes!! I've found my new tweening engine Thank you so much for making the core assets available to us. I have a question about syntax. I'm wondering exactly when to use "new" and I'm kinda confused. In the following code, a "new" constructor (am I saying this right?) is being used: var myTimeline:TimelineLite = new TimelineLite({paused:true}); myTimeline.append( new TweenLite(mc, 1, {x:100, ease:Back.easeIn}) ); myTimeline.append( new TweenLite(mc, 1, {y:200, ease:Back.easeIn})); myTimeline.append( new TweenMax(mc, 1, {tint:0xFF0000}), -2 ) However, when using "TweenMax.from" or "TweenLite.from" when appending the TimeLine, "new" cannot be used as shown here: (i get an error if i use "new") myTimeline.append(TweenLite.from(box1, 1, {x:0, ease:Back.easeIn}) ); myTimeline.append(TweenLite.from(box2, 1, {x:0, ease:Back.easeIn}), -1); myTimeline.append(TweenMax.from(box1, 1, {tint:0xFF0000}), -2 ); myTimeline.addLabel("spin", 2); myTimeline.insertMultiple( TweenMax.allTo([box1, box2], 5, {rotation:"360", ease:Back.easeIn}), "spin"); Why is this? Thank you -Digital
×
×
  • Create New...