Jump to content
Search Community

Carl last won the day on December 24 2023

Carl had the most liked content!

Carl

Moderators
  • Posts

    9,823
  • Joined

  • Last visited

  • Days Won

    546

Everything posted by Carl

  1. no, the fullsize image is still there. no copies are made. this should help: viewtopic.php?f=6&t=4644&p=18580&hilit=original+size#p18587
  2. #2 have your onComplete call a single function which in turn calls 2 other functions.
  3. just to be clear, there is no "inside" or "outside" of a TimelineLite/Max. each command that is used to create a timeline or add tweens to it is its own singular entity without an opening or closing. var tl:TimelineMax = new TimelineMax(); tl.append(...sometween...); trace("i am between two append commands, not inside them"); tl.append(...someOthertween..._) trace("i am not outside or the timeline, just after it"); on the other hand your if statement does have an inside and an outside: //this code is outside the if statement if(something == true){ //this code is inside the if statement //you don't want to define functions here } //this code is outside the if statement. hopefully this helps. I'm glad you got it working.
  4. i made a very simple example and it works fine: import com.greensock.*; var f:TimelineLite = new TimelineMax(); var type:Number = 1; if(type == 1){ f.append(TweenLite.to(mhook, 1, {_x:200, onComplete:myCustomLoader})) }else{ trace("type does not = 1"); f.append(TweenLite.to(mhook, 1, {_alpha:0})); } function myCustomLoader(){ trace("myCustomeLoader()"); mhook.loadMovie("child.swf"); } cs4 files attached
  5. maybe its because you are defining function loadOpen() inside your if statement. have you put a trace in loadOpen()?
  6. in this situation, the best way is the way you are most comfortable with. you very well could have 1 xml file or 3. either way you are going to have to come up with a way to sort your data and randomly select swfs. there is nothing built into LoaderMax that will do this for you. Since it appears that all the swfs are going to have the same basic properties like with / height / x / y you could probably just load a list of all the swfs instead of having a bunch of SWFLoader nodes in your xml. once you load that xml... -search for all the swf urls in group a -place them in an array -shuffle the array -pick the first 2 out of group a array and store them in an array that will hold all the url's of all the swfs. -search for all the group b swfs -place them in an array -randomly select 1 and place it in the array that stores the chosen 2 from group a -do the same theing for group c when you are done, loop through the array of the "chosen few" and create SWFLoader's based on the urls, append them to a LoaderMax, and then load the LoaderMax.
  7. i notice you only declare f if type == 0 if(_root.type==0){ var f:TimelineMas = new TimelineMax yet if type==1 you try to append tweens to f. else if(_root.type==1){ //this code doesn't know what f is. f.appendMultiple([ new TweenLite(ripped2, 1, {_x:1600, delay:2}), new TweenLite(mripped, 1, {_width:0.01, delay:2}), new TweenLite(mLogo, 1, {_width:0.01, delay:2, onComplete:closing}) ]) I don't know if that is related to your problem or not. what errors are you getting?
  8. you can't assign new properties to Button symbols. you need to use Movie Clip symbols.
  9. ok, 1 more problem is that loadMovie needs 2 parameters: 1-the url of the swf you are loading 2-the target movie clip that the loaded swf will get loaded into so the code would have had this in your params array: ["comp/swf/start.swf", _root.mhook] but I tried that and all manner of scope finagling and I got the same weird target / base error as you. very strange. what you can do is simply use delayedCall to call your own function that will load the swf for you like: TweenLite.delayedCall(.5, myCustomLoader, this) function myCustomLoader(){ loadMovie("comp/swf/start.swf", mhook); }
  10. hmmm, I've never done that before and it could take some experimenting. I would start by adding all my tweens to an array, then randomize/shuffle the array, then loop through the array and append the tweens in the order that they appear in the shuffled array. there could very well be something very wrong with this idea, but it might be worth a try. If I have time later I might just toy around with it.
  11. I'm a little bit confused by how videoControl() is getting called and thus what the target of the event is. did you try: event.target.playVideo() It's late so I'm a little rusty at the moment. The best thing you can do is grab the source files from this tutorial as it is the best thing out there for learning how to work with VideoLoaders: http://active.tutsplus.com/tutorials/ac ... e-premium/ if you still have questions or clarifications, feel free to post back here.
  12. great job on your animation! very cool! the only thing I felt could need improving is that the blur seems a bit extreme and the transition from blurry to clear is a bit quick. it's not like its horrible or anything, I just prefer things a bit more subtle. it really is quite good! here is the tutorial I was talking about http://bit.ly/r2g0wh. thanks for the inspiration! Carl
  13. Hi Dingoman, Just so you know, I'm going to be releasing a tutorial on this very subject very soon. In fact it was inspired by your question. That slot machine you linked to appears to be very nice. I don't think you could go wrong investing $10 bucks to see exactly how it is made. you could learn a lot and save yourself a bunch of time. just my 2 cents. attached is a sample file that I will be using in my tutorial, it should hold you over. online preview http://snorkl.tv/dev/blitmask/slotDemo.html it uses GreenSock's new BlitMask tool. read up on it here: http://www.greensock.com/blitmask/ http://www.greensock.com/as/docs/tween/ ... tMask.html see attached files
  14. Carl

    blur plugin

    there are issues with combining Flash Layer Masks with objects that are manipulated via ActionScript. It's not really a TweenLite issue. You should be able to set a mask via ActionScript and have everything work fine. theObjectThatIsBlurred.mask = someMoveClip great article: http://www.republicofcode.com/tutorials ... s3masking/
  15. please read the page I linked to previously http://www.greensock.com/tweenvars/ onComplete is addressed in the first code sample. thanks and enjoy Carl
  16. f.append(TweenLite.delayedCall(5, loadMovie, [_root.mhook.loadMovie("comp/swf/start.swf")])) the flash player sees loadMovie("comp/swf/start/swf") and runs that code as soon as it is encountered. I suspect this is a typical as2 scope issue viewtopic.php?f=1&t=4337&p=17227&hilit=delayedcall+scope+as2&sid=f56b6a6b8c4b18bae7265048c786689f#p17227 try setting the scope with the this keyword TweenLite.delayedCall(.5, _root.mhook.loadMovie, ["comp/swf/start.swf"], this)
  17. does the following code work? _root.mhook.loadMovie("comp/swf/start.swf") does this work outside of your timeline? TweenLite.delayedCall(.5, _root.mhook.loadMovie, ["comp/swf/start.swf"])
  18. Using the "normal" TweenLite vars object I'm not so sure that is possible. The good news is that TweenLiteVars makes this really easy: http://www.greensock.com/tweenvars/ import com.greensock.*; import com.greensock.data.TweenLiteVars; var dynamicProp:String = "x"; var dynamicPropValue:Number = 300; TweenLite.to(mc, 1, new TweenLiteVars().prop(dynamicProp, dynamicPropValue));
  19. 2 things: 1: When using appendMultiple you can either --inset your own array of tweens (as you are doing with each new TweenLite(...)) OR --use allTo() or allFrom() to create the array of tweens for you. In your code you are using 2 single tweens + an allTo() in your appendMultiple so your results may not be as intended. Basically your appendMultiple is accepting an array that contains multiple tweens plus another array of tweens. 2: You are not using delayedCall properly. You need to specify the name of the function that will run with no parenthesis () or parameters. If you want to pass in parameters, use the onCompleteParams property as noted in the documentation: http://www.greensock.com/as/docs/tween/ ... layedCall() so you need to do: f.append(TweenLite.delayedCall(5, _root.mhook.loadMovie, ["comp/swf/start.swf"]))
  20. thanks for providing the cs4 version. it worked fine. your progress bar is visible by default my assumption is that: even though the assets are cached, your swf still has to look for them and even though it finds them quickly in the browser numerous progress events are still firing and your progress bar is just doing it's expected job of visually representing the load process.
  21. I can't open you files with flash cs5. perhaps you can set a Timer or delayedCall() to check the the progress of the loading after .05 seconds. if the progress is less than 1, then show the progress bar (for initial load) or else move it or hide it.
  22. can you post just the files necessary to illustrate the problem. probably just need and fla, AS and xml as we just need to get "parseXML" to run for now. thanks Carl
  23. ahh, this reminds me of my AS3 Code Challenge: http://www.snorkl.tv/2011/06/as3-code-c ... #more-1007 the general idea is that you need: onUpdate callback to constantly rotate the child clip you need an equation in the onUpdate that rotates the child clip the proper amount of degrees. Here is an example: http://snorkl.tv/dev/bezierChild/ here is some sample code: import com.greensock.*; import com.greensock.easing.*; TweenMax.to(arm, 3, {bezierThrough:[{x:136, y:115}, {x:209, y:178}, {x:328, y:128}], delay:.5, orientToBezier:true, onUpdate:fixBox}); function fixBox(){ trace(arm.rotation); arm.box.rotation = 0-arm.rotation; } fla attached
  24. I don't see anything that would suggest a pause is taking place in your code, unless the last tween on fl01 to alpha:90 may just not be that noticeable. Can you upload a simple file with just this code and the necessary assets so that we can test it for ourselves? you could also experiment with using yoyo:true so that the effect is more like a smooth pulse of fading in and out instead of everything abruptly jumping back to alpha:0. of course that sort of flicker-effect may be what you intended and that is absolutely fine. var timeline:TimelineMax = new TimelineMax({repeat:-1, yoyo:true});
×
×
  • Create New...