Jump to content
Search Community

Carl last won the day on December 24 2023

Carl had the most liked content!

Carl

Moderators
  • Posts

    9,825
  • Joined

  • Last visited

  • Days Won

    546

Everything posted by Carl

  1. you want to run a tween on a movie clip inside swf b from swf b? i'm confused here. please clarify. If you need swf a to communicate with a movie clip in swf b, then I would strongly suggest using a SWFLoader to load the swf and use the getSWFChild method: http://www.greensock.com/as/docs/tween/ ... tSWFChild()
  2. your conditional statement only runs the instant the mouse is clicked... not while the tween is running. you will need to use an onUpdate callback to test during each step of the tween: TweenMax.to(monkey, 1, {bezierThrough:[{x:300, y:50}, {x:400, y:550},{x:0, y:200}], orientToBezier:false, onUpdate:checkHit}); function checkHit(){ //your collision detection code } please turn the caps lock off. thanks.
  3. no. as for the rest of your problems its difficult to diagnos without seeing anything thing. It is possible that your AE swfs are very complicated and are causing some processor lag. TweenLite and its siblings always accurately render their animation based on how much time has elapsed. so if your AE swfs cause a 2 second lag, the TweenLite animations will render their animations as they should appear 2 seconds into the animation. I don't really understand your setup of loading 5 swfs with LoaderMax and then going to another frame and loading the main swf, but perhaps there is a good reason. Your LoaderMax code looks fine... you could remove the if(pcnt = 100) and just have an onComplete callback... but that isn't a big deal. Again, its hard to really definitively give any advice without seeing what is happening or knowing more about the assets you are loading.
  4. The loaders that you have in your xml have no control over or relation to loaders declared in other swfs. If GalleryContent is trying to load 5 swfs, those swfs are going to load regardless of what is in your xml.
  5. Hi Isaac, Thanks so much for the clarification. Unfortunately I'm in a similar boat as you and not terribly equipped to really suggest "best practices" and complex architectures. I'm more of a brute-force kind of guy and if I can get something to just work... I'm pretty happy. You may find some guys on the kirupa.com or actionscript.org forums a bit more vocal and elaborate in their advice on such matters. I'd think that if you seek guidance on one particular aspect of your structure in one of those forums, plenty will chime in. I have heard plenty of people speak well of gaia and integrating LoaderMax with it successfully. I'd say you are wise to experiment with your own systems as it is the best way to learn what works and what doesn't. I know for myself this stuff doesn't always come easily but over time it does get easier. I wish I could be of more help. Carl -c
  6. is it possible to clarify the question? what problems are you having with dispose?
  7. make sure that your heavy assets aren't on frame 1. frame 1 of the swf should only have your actionscript code. if you put your images and stuff on frame 1, frame 1 won't render anything until all the assets on frame 1 are loaded, more importantly I don't think that script executes until the frame is fully loaded. keep frame 1 as light as possible. does that help?
  8. Hi. Welcome to the forums. What specifically do you need help with? Do you have some code that you need fixed? The support given here is pretty specific to helping people with the GreenSock Tweening Platform and not so much "how to organize a project" as it is difficult to assume everyone's level of expertise and it can be quite time consuming. The tricky thing with the eddie bauer example is that it loops infinitely in both directions, so you are going to have to figure out a way to detect which item to show next and position it properly. I have a tutorial that talks a bit about swapping assets around in an infinite loop but it isn't exactly what you are looking for. it may be a good starting point. http://www.snorkl.tv/2011/02/easy-infin ... ll-part-1/ If you have questions specifically about that tutorial, please post them on that page. A BlitMask would work really well too: http://www.snorkl.tv/2011/10/use-blitma ... d-looping/ if your slides are interactive you would need to set bitmapMode to false when the tweens finish. Carl
  9. hmmm I don't follow: first you say: so I'm assuming you have something like var ldrh:SWFLoader = new SWFLoader("homeContent.swf", {name:"home"}); so that means the ldrh is the name of a SWFLoader that loads homeContent.swf and then you say: I don't understand why you also have an XML file that contains a SWFLoader that does the same thing as in step1. regardless of whether or not your SWFLoader was created directly in ActionScript code OR it was created via SWFLoader data that was loaded by an XMLLoader you can reference any loader by name via LoaderMax.getLoader("name or url of loader"); Again it would be best to try and create a simple example. If it doesn't work, post the code you are using here and it will be much easier to diagnos the problem. thx.
  10. any chance you can re-word this or show your xml and how you plan on parsing it? I'm having a difficult time understanding.
  11. yup you are exactly correct. in your ActionScript code whenever you declare a new SWFLoader or XMLLoader they get activated automatically and XMLLoader knows to be looking for them.
  12. cool! I was just in the middle of writing a series of vague and mostly incorrect assumptions about this:)
  13. are you activating the VideoLoader in the file that is loading that xml?
  14. sure. just use TweenMax.from() TweenMax.from(mc, 1, {blurFilter:{blurX:20}});
  15. to avoid any conflicts in the future with getLoader("mainQueue") or getContent("mainQueue"), yeah that would be a great idea. the child onComplete is only running a trace from what I can see, if it helps you debug, then great, but unless it includes some functionality necessary for your app feel free to remove it. very easily, in fact its quite common if you have a series of ImageLoaders, it is very handy to have them all share the same onProgress and onComplete handlers. a very simple example would be var loadCount:int = 1; var i1:ImageLoader = new ImageLoader("img1.jpg", {onComplete:done}); var i2:ImageLoader = new ImageLoader("img2.jpg", {onComplete:done}); function done(e:LoaderEvent){ trace(e.target); loadCount++; trace(loadCount); } i1.load(); i2.load();
  16. your welcome and thanks! great to hear. yeah, BlitMask is killer.
  17. if you can manage to get all the frames of your animation into single bitmap I imagine BlitMask could very easily do the heavy lifting for you. you just have to configure your dragger to offset the x position of the BlitMask's target. I'd say give it a try. Keep in mind that although BlitMask performs great there is no way around the overhead of keeping the pixel data in memory.
  18. the reason #1 looks smoother is because it has the longest duration of animation. The #1 clip is animating for 1.5 seconds. for the first second of animation the ENTER_FRAME script is progressively overwriting tweens and nudging the clip pixel by pixel. when ENTER_FRAME script is removed, (after 35 frames) the last tween to be created by moveIn() runs for an additional .5 seconds. your #2 clip has a duration of .5 seconds so there is less time to render intermediate steps. your #3 clip has a duration or 1 second so that is why it looks better than #2 but not as good as #1. ---- I appreciate that you took the time to make that demo. With your best interests in mind I have to urge you to not put TweenMax tweens in a script that is running via ENTER_FRAME. the reason you can't perfectly match the ease style of #1 is because eases effect the speed/progression of the animation throughout the entire duration. With clip 1 there is no easing at all for the first second of animation, and then a very slight ease is applied for the last .5 seconds. your best bet is to give a single TweenMax a little more time and experiment with the various easing equations.
  19. the order in which assets are appended to a LoaderMax does not dictate the order in which they complete loading. it very well could be that tractor.swf finishes the race first. by default maxConnections is set to 2 which means there are up to 2 assets loading at any given time which makes things more effecient. You could set it higher if you like. the onComplete on your "mainQueue" should be the last onComplete to fire. so I would suggest waiting for that to fire before doing anything that requires all the assets to be loaded. and in many cases multiple loaders can share the same onComplete handler and also each loader can have it's own.
  20. I'm sorry, I don't understand what you mean by "TweenMax's own sine methods". if you were able to pre-calculate the values I'd say you're much more ahead of the curve than me when it comes to trig.
  21. it will be drastically different depending on whether you use AS2 or AS3. AS3 will be much easier. If using AS3 google "AS3 DisplayList tutorial". unfortunately shuffling depths (stacking order) of cards is a bit beyond the type of support we give here. in general you will use a tween to slide a card out and then probably call a function that will handle putting it at another depth and then tweening it back to position. you could do something like this with AS3: //move card 2 out of the stack to the right TweenLite.to(card2_mc, 1, {x:200, onComplete:placeOnTop, onCompleteParams:[card2_mc]}); function placeOnTop(mc:DisplayObject):void{ //place card on top addChild(mc) TweenLite.to(mc, 1, {x:originalPosition}); }
  22. hello. there are many reasons why you're animtion may not be smooth: frame rate, duration, size of asset, rate of change, bitmap/vector etc. if you would like to post a flash CS5 or lower fla we will be happy to look at it. Using your first method is not good and defeats the purpose of TweenLite/Max. function moveIn(e:Event):void{ TweenMax.to(object_inst, .5, {x:300}); } addEventListener(Event.ENTER_FRAME, moveIn); when you use ENTER_FRAME moveIn() will create A NEW TWEEN many many times per second. as soon as your tween starts, it gets overwritten by a new tween. Also the .5 for duration is totally ignored. the reason this method may appear smooth is that the object only movies a fraction of a pixel many times per second. I also bet it takes much longer than .5 seconds. if need more help understanding let us know. but please trust me and don't use the ENTER_FRAME method as you have shown.
  23. have you tried different eases? or no easing? Quad.easeOut is the default ease, which I have to assume is being used as I didn't see any code to change that. so you're first animation is progressively getting slower until it stops and then the next tween is starting quick and slowing down. try //import all easing equations import com.greensock.easing.*; //use a Lineaer:easeNone TweenLite.to(blastwave, .375, {alpha:.5, transformAroundCenter:{scale:2.23}, onComplete:blastScaleFadeOut, onCompleteParams:[blastwave], ease:Linear.easeNone}); or maybe try an easeIn on the first tween and an easeOut on the second.
  24. can you make a stripped down fla just to include the symbols and tweens in question and post it here?
  25. you could also use TweenMax to move an object along the x axis and call onUpdate function that runs your own calculation on the y. this might help: http://www.splung.com/content/sid/2/page/shm I made this 6 years ago with a basic onEnterFrame script: http://doyouhaveapen.com/junkyart/sinulator.html I was going to turn the ball into a pig that you threw into a pile of birds but thought it was too silly. the GreenSock Tweening Platform doesn't support want you want directly but there are plenty of ways to get a sine wave style animation with AS3 and perhaps a touch of TweenLite.
×
×
  • Create New...