Jump to content
Search Community

Carl last won the day on December 24 2023

Carl had the most liked content!

Carl

Moderators
  • Posts

    9,821
  • Joined

  • Last visited

  • Days Won

    546

Everything posted by Carl

  1. have you tried stopping the timeline with timeline.stop() when the user navigates away? It might be less troublesome to build all your animation into one TimelineMax so that you don't have to jump back and forth between frames on the main timeline. http://www.snorkl.tv/2011/03/bullet-pro ... o-section/ its as3 but the TimelineMax concepts would be exactly the same
  2. check out Jack's file that he posted in this thread: viewtopic.php?f=1&t=4243&p=16824&hilit=bitmap+sequence#p16824
  3. I think this should help you: viewtopic.php?f=1&t=4408&p=17556&hilit=immediateRender#p17556 to make your 0 duration tween not render until the timeline plays: tl.append(new TweenMax(_theTarget,0,{x:854,y:104, immediateRender:false})); yes, pausing the master forces the children not to play. there is a difference between a timeline playing and the initial properties/values of the objects being tweened getting set/rendered. your 0 duration tween was rendering because as Jack said in that other post... when the tween is created TweenLite says "0 duration?, oh no, I better do that now!" by setting immediateRender:false, you are making sure those values don't get set until the tween gets told to play by its parent timelinemax. Another point to consider is that by definition a tween needs to have a duration, start values and end values. by setting a 0 duration, there is no end or beginning time. It's very cool that TweenLite is flexible enough to accommodate these non-tweens. -- don't worry from() tweens and 0 duration tweens are the only tweens that really require any sort of tweaking of immediateRender. Once you use it once or twice it pretty much sinks in. --- if you need more explanation, i'll try to help. I think Jack's explanation is spot on (obviously) so I don't want to clutter it up too much. Carl
  4. It could be an Overwrite issues, it could be because you are using MOUSE_OVER and MOUSE_OUT instead of ROLL_OVER and ROLL_OUT. there isn't much to go on from the little code you posted. the "loop, etc" that you refer to could be causing it. i don't know. please attach a zip of your files that only contain these buttons and the code necessary to replicate the problem. i'll be able to take a look it this afternoon or later tonight.
  5. you could move it away real quick, and then roughEase it back OverwriteManager.init(2) //tween it away TweenLite.to(bg1, .5, {y:100)}); //tween it back after the first tween finishes (note delay) //make sure the y prop is the centered positioned you are seeking TweenLite.to(bg1, 6, {y:0, ease:RoughEase.create(1.5, 200), delay:.5});
  6. TimelineLite/Max will always play as soon as they are created (i'm pretty sure it renders on the first ENTER_FRAME that occurs after your code executes) unless you tell them to be paused. a simple test var timeline:TimelineMax = new TimelineMax(); timeline.insert(new TweenMax(background, 0.4, {alpha:1}); timeline.insert(new TweenMax(icon, 0.4, {alpha:1}); it will play automatically without needing to call timeline.play() What you will need to do in your case is pause the parent TimelineMax and then tell it to play when you want. var timeline:TimelineMax = new TimelineMax({paused:true}); for each(var button:ButtonClass in buttons) { timeline.append(button.show()) } timeline.play(); the nested TimelineMax's will not play until the parent TimelineMax is told to play. let me know if that works Carl
  7. Hello Amit, I am not experienced with subloading so deeply, and quite honestly root as opposed to _root still hangs me up sometimes. BUT based on Jack's response here: viewtopic.php?f=6&t=4869&p=19825&hilit=requirewithroot#p19825 I believe that it is possible that since your mp3 loadermax queue isn't populated until AFTER your xml loads the requireWithRoot is being set too late. I notice that you do instantiate your queue at the top of your class. so it does exist on frame 1. Try passing in the queue vars when you create it (top of class). If that doesn't work, make your queue public. If that doesn't work... I don't know. Please post back with your results. I'm sure there are others that can help you if needed. Carl ps. what's up with all the loading going on without LoaderMax?
  8. nothing you did looks really wrong to my semi-trained eyes. I made a very simple example to attempt to re-create the problem. What I found is that if I load a video, let it play for a bit, unload it, load again... everything works fine. But as you describe, if the video plays all the way through and then you unload, subsequent loads won't work as we would expect. It seems if I unload and load after watching an entire video, it will display (sometimes) but freeze on frame 1. Here is an example of the problem: http://www.snorkl.tv/dev/loadVideo/load ... ROKEN.html (video is about 10 seconds long. it ends on fade to black) SOLUTION (for now) I don't know if this is the expected behavior or a bug, but in order to force your videos to play on subsequent loads here is what you do for all your loaders: var Video_Breathe:VideoLoader = new VideoLoader("Breathe_Video.f4v",{container:this, x:0, y:0, onComplete:videoLoaded}); var Video_Live:VideoLoader = new VideoLoader("Live_Video.f4v",{conainer:this, x:0, y:0, onComplete:videoLoaded}); var Video_Sleep:VideoLoader = new VideoLoader("Sleep_Video.f4v",{conainer:this, x:0, y:0, onComplete:videoLoaded}); var Video_Feel:VideoLoader = new VideoLoader("Feel_Video.f4v",{conainer:this, x:0, y:0, onComplete:videoLoaded}); function videoLoaded(e:LoaderEvent):void{ //will force the most recently loaded video to play from beginning e.target.gotoVideoTime(0, true); } here is my fixed version: http://www.snorkl.tv/dev/loadVideo/ you can download a zip of all the files including greensock classes (no member stuff) and a sample video: http://www.snorkl.tv/dev/loadVideo/load ... eo-CS4.zip Please let me know if this adjustment or the file load_video_complete.fla works for you. also, make sure your greensock files are up to date. -Carl
  9. TweenLite can easily tween movie clips or the root timeline of a swf to any frame frame label. http://www.snorkl.tv/2010/10/overview-o ... backwards/ The great things about using frame/frameLabel tweens is that you can easily chain them in a TimelineLite/Max, reverse them add onComplete callbacks and adjust the speed. when you build your AnimateIn/Out() methods, you could just use some tweens that control movie clips public function animateIn():TimelineLite { var tl:TimelineLite = new TimelineLite(); tl.insert(new TweenLite(some_mc, .5, {frame:300})); tl.insert(TweenLite.from(this, 1, {x:"400", blurFilter:{blurX:50}})); return tl; } I also have a tutorial on the GreenSock Homepage Animation OOP approach here: http://www.snorkl.tv/2011/05/real-world ... ase-study/
  10. this should help quite a bit: http://www.snorkl.tv/2010/11/create-a-s ... y-clicked/
  11. thank you for posting your results. I realize i mis-understood your question as you wanting to duplicate the swf you loaded, and not gain access to symbols inside it. still I wouldn't have had the solution for you. I'm glad you got it to work. there seems to be a bit more info out there on using assets in the libraries of external swfs: http://www.ultrashock.com/forum/viewthread/92007/
  12. 1: you shouldn't see the assets on stage at all. test this page: http://snorkl.tv/dev/from/ (do you see a blink?) that is a TimlineMax that just has a bunch of from() tweens in it. the timeline code looks like this: function doStuff() { clips = shuffleArray(clips); var i:int = clips.length; while (--i > -1) { timeline.append(TweenMax.from(clips[i], .3, {alpha:0})); } } all the movie clips are totally visible on the stage in flash/ 2: SplitTextField typewriter, just do a from() tween again with a 0-second duration.... from alpha:0 3: for your earthquake, maybe something like a rough ease http://www.snorkl.tv/2010/10/use-tweenl ... er-effect/ http://www.greensock.com/roughease/
  13. thanks man. I may just turn this random fader thing into a tutorial someday. there are some useful techniques in there.
  14. I'm 99% certain that you can not duplicate instances of loaded swfs this is a limitation of Flash Player and not LoaderMax. http://www.actionscript.org/forums/show ... 3?t=151062 If you google "ActionScript 3 duplicate loaded swf" you will see some fairly cryptic guesses and suggestions but nothing that seems as rock-solid as having multiple loaders for the same asset. also to note, once you load the file once, it should be cached by the browser and not take any time to download multiple times.
  15. just do this import com.greensock.*; import com.greensock.easing.*; var allMovies:Number = container_mc.numChildren; var clips:Array = new Array ; var eachMovie:MovieClip; var timeline:TimelineLite = new TimelineLite();//makes it simple to sequence for (var i:Number = 0; i { eachMovie = container_mc.getChildAt(i) as MovieClip; clips.push(eachMovie); } doStuff(); function doStuff() { clips = shuffleArray(clips); var i:int = clips.length; while (--i > -1) { timeline.append( new TweenLite(clips[i], .3, {alpha:0})); } } //shuffle function lifted from Matt Maxwell: http://mattmaxwellas3.blogspot.com/2010/10/as3-shuffle-array.html function shuffleArray(arr:Array):Array { var arr2:Array = []; while (arr.length > 0) { arr2.push(arr.splice(Math.round(Math.random() * (arr.length - 1)), 1)[0]); } return arr2; }
  16. the biggest problem that I see is that you are calling doStuff() inside your loop. if you have 300 children movie clips. you are creating 300 timelines. you want 1 timeline, with 300 tweens inside it. only call doStuff() after the loop runs. you may still have errors, but I'm pretty sure you will have better luck once that issue is resolved.
  17. nothing jumps out at me for being the definitive cause of the error. I would suggest removing all the button code except for one button and then run a few traces on the objects that are being tweened: trace(cs) trace(cw) etc and try to detect which object is the null object. when you gotoAndPlay(1) all that initialization code is being executed again. (yes the tweens shouldn't be running as you stated) I don't know what is happening in frame 2. perhaps something is being removed. In general I would just recommend not jumping back and forth between frames. It everything is on stage in frame 1, there is no need to go to frame 2 for anything, just show/hide the relevant clips. You can also grab the credits assets from the library when needed and remove them when you are done. --- if your errors persists, feel free to attach a zip of your fla that contains minimal code and assets to re-produce the errors
  18. you could force your x values to be integers. myclip.x = int(stage.stageWidth / 2)
  19. enjoy that brisket! slow and low.
  20. Hello Karl, I'm not part of the development team (that would be disastrous), but as you can see I do my best to offer support. I'm very glad to see that my tutorials have helped you get started. I've only recently started using LoaderMax. I've found that although the documentation is stellar, there are so many options / features to mix and match that it can be a bit overwhelming at first. I noticed on this forum that a lot of people just need a little push in the right direction. Learning LoaderMax is a bit more involved than the TweenLite family of tools. When answering questions here I found myself always digging through the documentation and then building little demo files to test the solution. I realized for myself that it was very helpful to have a series of files laying around that simply: load an image, load a video, load 3 images from xml, load and unload a swf... etc. really simple module things. Then when people ask "how do i do X when the video is done playing?" I just dig open my VideoLoader file and pluck away. With the LoaderMax series on Snorkl.tv I'm really hoping to give people like you a sound starting point for doing x, y and z. I've found that having something that works with basic functionality makes adding the bells and whistles seem like not so much of a leap. Its great to see people using those files. I have a zillion things left to cover with LoaderMax. its a big mountain to climb but hope to get the next tutorial up sometime soon. I'm pretty much learning as I go too. Answering questions in this forum is still pretty difficult for me but its really helped me improve. Bookmark the documentation. I'm in there like 10 times a day and am still learning new things! Good luck with the thumbnails, check out Jack's sample slideshow : http://www.greensock.com/as/LoaderMax/slideshow.zip It is a very sound model to follow. If you are new to OOP it might appear a bit intimidating. There are probably half a dozen ways to do it. Take it one step at a time;) -c
  21. I'd say that's probably the cleanest / best approach you are going to find. the only thing that you could do to be .0001% more efficient and would have 0 noticeable benefit is call allanim directly onComplete instead of calling loopTween there aren't a whole lot of methods to work with when using TweenNano. when using your approach, don't you also have to reset all the properties that were tweened back to the normal position? 1 thing you could do is have a blank frame on frame 1 have all your assets and code on frame 2 stop(); function sequence(){ TweenNano.to(yellow, 1, {x:400}); TweenNano.to(red, 1, {x:200, delay:1, onComplete:gotoAndPlay, onCompleteParams:[1]}) } sequence(); going back to frame 1 will reset all the items back to their starting positions / values. in frame 1 you could have a background color / border / logo or whatever static elements. if you fade everything out before the loop, you won't notice any gap / jump.
  22. no problem, i just wanted to make sure i wasn't missing something. i've edited my post too:) thanks!
  23. if the XMLLoader is loading an XML file that has 4 SWFLoaders, the XMLLoader will have 4 children put this into your XMLLoader complete handler: trace("evertything loaded"); trace("children of XMLLoader " + event.target.getChildren()); trace("number of children of XMLLoader " + event.target.getChildren().length); in the above event is the LoaderEvent that is being passed to the function as in: function queueComplete(event:LoaderEvent){} your argument name may vary without seeing more code or xml it will be very difficult offer any more assistance. perhaps you can upload your files with small images if you need more help.
  24. the big problem is that you are using an old and incomplete version of the greensock files. you have none of the LoaderMax classes. Go to http://www.greensock.com/tweenlite and download the latest version. copy the com folder to the same folder as your fla second: your addCallback function doesn't match the name of the function you want to reference you have tl.addCallback(playSound1, tl.duration); but your method is called playSound() (you are missing the 1) function playSound():void{ sound1.gotoSoundTime(0, true); } make sure those names match, use playSound1 or playSound in BOTH cases. after that I couldn't test anymore as you didn't provide the sound files. I think that will get you pretty close though.
  25. http://www.actionscript.org/forums/show ... ostcount=2 that is a handy script to get all children of any movie clip or displayObjectContainer. while that loop is running, you can push each child into an array, then use the allFrom/to on that array.
×
×
  • Create New...