Jump to content
Search Community

azpaul

Members
  • Posts

    19
  • Joined

  • Last visited

azpaul's Achievements

0

Reputation

  1. Thanks... That's exactly what I did and narrowed it to the the to var statements. Not sure why the interfere but they do. I was able to reproduce it instantly.
  2. Timer issues. OK, Nailed it but I do not understand why. var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); I originally had this out of the function that I call to get the new data. When I moved it into the function, it no longer interferes with the timing? Would you know why a declaration like this would interfere with another function? I have the whole zip file on actionscripts.org. This was caught by luck...
  3. Removing the second key frame did not fix that issue with the timer function. Other than trace statements, I am not sure how to trace this problem to it's roots. Any suggestions? Thanks.
  4. Hi Jack, As usual, you have cleared some issues up. This is for that project that we discussed earlier. I thought I had it completed but ran into some looping issues. So out of frustration I basically started from scratch creating a single fla of each stage to get a clean working segment. That is where I ran into these quirk, or shall I say my misunderstandings. To answer your questions below. Based on a previous discussion, I converted the first frame to a blank key frame. I guess it produced a second frame which I saw but did not think was an issue. I think at one point I actually saw that happening. The whole movie was kind of stuck and flickering. By breaking down the segments the way I did, I found a quirk in the timer function and this may be the culprit. It basically skips the counting every other time when my xml dtata loder is not commented out?? Will look deeper into that. Nice to know... Thanks. I did watch that video and that is what got me up and running before. So if I understand right, I have a declaration of tl for a new timeline. Where ever I put the tl.append timeline it will always look at starting at frame1. But if I declare say 3 variables for 3 different timelines, they will run separately in the functions that I declared them in, but at frame 1 respectively? I knew that the were different. I did not realize that in order to fade in, the property must be set to alpha:0 first. That explains why it behaved the way it did. I saw that alpha had to be 0 before I could fade it to 1 but did not know why. TimelineMax allows me to easily set the delays and tweens when I want them, alteast where I think I want them. I have experimented with tweenMax alone as well. As usual, thanks for the suggestions and it did help! You explain things so us novices understand.
  5. Hello, Of course I can not just let a problem lie without trying to figure it out. I have been able to get the tweens working again in the .as files. In order to do so I have to still declare a new variable in the function of the tween. This still doesn't seem right. A question with alpha. In the bytMe.as file I pretty much set all the symbols.visible to false. In the timer.as file I try and set the alpha to one of the symbols so it fades in. I can use autoAlpha but it pops in like a visible:true. In order to get the alpha to fade in to 1 I have to set the symbol in the bytme.as function to alpha=0. When you call an alpha:1 and the object is set to visible=false, shouldn't the alpha automatically set it to true and the fade in? Isn't it more efficient to turn the visibility of the object off when not showing on the stage and not just setting the alpha to 0? Thanks..
  6. Hello, I have been trying to tweek some code I just wrote and fix a looping problem that popped up. So, going back to basics I have dissected each portion of code and seeing if I can make it more simple and efficient. I have had some breakthroughs. However, while working with the simplified code, I am having some problems with the tweening. Maybe I am doing something wrong or forgot something important to make them function. The fla and code is very small and I hope by walking through I explain it thoroughly. I have my main fla with 2 actionscript files. My main fla includes these two .as files. This is it for any scripting in my fla file. action.as simply pulls data from an xml file and populates an array. I am trying to learn how to make this data available to other functions without creating a special class. I think I have been successful by declaring the variables at the top of the script. I can seem to use them in any function that way regardless of the file. So now that I have my data I call a function that turns 8 symbols off dynamically. I was not able to do this before and it removes a whole lot of code. I will eventually be implementing this to turn 80 symbols off all at once. The function is called byteMe as is the actionscript file. So far so good. Right after I turn the symbols off, I use timlineMax to turn 1 symbol on. I can't get any of the Tweens to work. Now with my previous experience with declaring the variable in the first .as file, I figured I could do this as well and use tl.timeline.append anywhere in any AS file. Not so, for some reason I have to have the var statement in the function of the tweens? Should not work this way and it does not on my original project, for the most part. So, am I doing something wrong here? I have uploaded the fla file and the two .as files. I'm baffled. I have been working with code non stop now for three weeks and I thought I was starting to get the hang of things and now I can't seem to figure this one out? Also, if I put the tweens in the fla file with the var statement within the timeline statement , it works. I can access the object's visible property directly using object.visible = true. Please let me know if you have any question. Thanks.
  7. Hi Jack, Thanks for all your help. I think the original fla was working with was messed up some how. When I broke down the problems into an isolated fla that dealt strictly with the function I wanted to do, it worked. But when I copied it into the original fla, it would not. So, I just built of the working model. I was then able to pass variables and properties that I could not otherwise. The gotoAndPlay worked great except I did not foresee a splash screen needed at the end of the tweens. Because the entire movie was initialized I lost the values from my array. So now that I had good working model to work from, I was able to call specific functions with the onColomplete argument in the last tween. I was not able to move between functions so easily in the original model and being new to this, did not pick up something was wrong. I now have the movie go through all the tweens and at the end, throw a splash page with stats and restart the counter. and do it all over again. The issue with the clock maybe how the timer is written. I have another sample code that I am going to replace it with which drops the code to about 8 lines versus 30 or so. Bu it only does it in cs5 and I can see the lag when the output put is being written to the window. If I run the swf directly, it runs smooth. I added a fail safe that if he counter goes <0 the it acts as though it is 0. I have 4 Gigs memory so I don't think it is a memory issue and I did not see high cpu usage either. Being very graphics intensive, it is almost 2 megs now and being that it is a non interactive display only, it loads pretty quick. It will always be loaded from local drive on a unix or windows machine. I will have a demo at some point on my website so I will look at the loadMax for that. I have about 1.5 burst and then throttle back to about 512K upload speed on my server. As I am coming to almost a completion on this project, thanks again for all your help, suggestions and guidance! I am wondering though if I could have written the tweening more efficiently. I know you need to have a tween statement for every tween, but could you have a routine that allows you to say create a virtual tween without having to code a line for every tween? My final project ended up with 20 blocks of 7 lines of code and the only thing that changed is the symbol name. Talk to you soon.
  8. Hi Jack, I was able to work through all the issues. I had this weird flicker that was the stage color either coming in front of my main background image or that background image was becoming transparent. It only was happening when I was going to frame 1 on from the nextRound function. I ended up having to delete the entire layer and I used a jpg instead of a png for that image. Really weird. Another weird thing is when I test the movie with in flash, the timer gets messed up. It slows down and skips, but only when it runs from in the cs5. It will sometime go negative on me so I have to put a fail safe in the if statement. If I play the swf by alone, no skipping. Again, weird. I am wondering if I will have some issues when it is on the server? I will soon find out. Thanks for all your help. Oh, can you tell me if a 1meg swf is considered large?
  9. I got it... Have a few issues I have to work through like a flicker or something but the way I did this is from another post I simply added to the last tween onComplete: nextRound --- with out the parens... I saw that mistake in the post. Sure enough now that the the goto is in a function it fires off only when the last tween motion is complete. YES! But like I said I have a flicker issue and some of the symbols are not visible after the 1st cycles... I will keep you posted! Thanks!
  10. I am using trace statements to follow the progress and I see it looping through the functions. That is good, that part is working. But, the tweens no longer have any time to run. It is like the script to looping so fast that it does not have time to finish or start the tweens??? Also the clock in the timer exits the function pretty much right away. Again, it appears that the goto statement is infact reinitializing everything before it has completed. Here's what I did, Put the following code the bottom of my script timeline.kill(); trace ("Timeline killed"); gotoAndPlay(1); stop(); Then on the timeline of the main mc I converted all 1st frames to empty key frames. I have 6 layers. All 1st frames were blank except the Actionscript layer. This one I do not have a blank key frame on. It did not seem to matter when I did so I removed it. Here is what a correct output looks like from my traces. Tweens fire off in sequence with no problems. Get Time Function Stroke Off Function Timeline killed XML Contents ------------------------ Game Number is 28 Number Drawn is 1 Number Drawn is 2 First Tween Done Second Tween Done Seconds are 01 Seconds are 00 Second in If statement 00 Here is an output with the goto statement Get Time Function Stroke Off Function Timeline killed XML Contents ------------------------ Game Number is 28 Number Drawn is 1 Number Drawn is 2 First Tween Done Second Tween Done Get Time Function Stroke Off Function Timeline killed XML Contents ------------------------ Game Number is 28 Number Drawn is 1 Number Drawn is 2 First Tween Done Second Tween Done Seconds are 01 Seconds are 01 Seconds are 02 Notice no Seconds. It seem to not even get that far in the function before it was initialized. But further down in the output, because it does run indefinitely, seconds will appear here and there. Not both, sometime both maybe one. Seconds sometimes shows as a negative number. The stage flickers as it is running through. Is there an option with tweenmax that detects when a motion is complete to call a function. Then I could put the goto statement in a function. That way I know it is only getting called when the tween's motion is complete. Thanks. Sorry this was so long, I wanted to give a good idea of what was happening.
  11. Ah... I will try that! By the way, you are absolutely the fastest in replying on any forum I have been on!!! Thanks!
  12. Hi Jack, If I understand your reply correctly, at the end of my last tween I put timeline.gotoAndPlay(1); Then on my actionscript layer I put a blank frame, not a key frame? When I do either, nothing happens for me. The last tween completes and then the movie seems to stop. When I used a key frame, I was able to put 1 single line of code so I used a trace statement. This trace never showed. On the very bottom of my actionscript I have stop(); this is out side of the function. With out this the movie appears to infinitely loop on frame 1. This is my last tween. timeline.append(TweenMax.to(this["num"+ draw1 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, yoyo: 1, repeat: 1}), -1); timeline.gotoAndPlay(1);
  13. Hi Jack, When the movie starts, i cal a function for a clock to run. This clock runs before the function that has the tweens. Using a trace statement verifies that the tweens using tweenMax has not run yet. I figured it is taking the long to render and display the graphics even though the code is running right away. I tried using the repeat to to -1 and that only repeats the tweens unless I used the argument incorrectly. Should it take the whole movie as to when it was first opened? That is what I am looking to accomplish. Not really just repeat but restart, because the xml load function needs to load a new set of data. Here is the entire code not just the tweens. Thanks. include "stroke_off.as"; include "timer.as"; import com.greensock.*; //import com.greensock.easing.*; //import com.greensock.TimelineLite; var timeline:TimelineLite = new TimelineMax(); var xmlLoader:URLLoader = new URLLoader(); var xmlData:XML = new XML(); //var fields:Array; var draw0:String; var draw1:String; var draw2:String; var draw3:String; var draw4:String; var draw5:String; var draw6:String; var draw7:String; var draw8:String; var draw9:String; trace ("num2Stroke visible is set to " +num2Stroke.visible); strokeOff(); trace ("num2Stroke visible is set to " +num2Stroke.visible); //var ingrd:Array = [ing1, ing2, ing3]; xmlLoader.addEventListener(Event.COMPLETE, LoadXML); //A bit of error handling in case the XML goes missing; xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, xmlError); xmlLoader.load(new URLRequest("data.xml")); //numbers = new Array(num1, num2); //fields = new Array("one","two"); function xmlError(e:IOErrorEvent):void{ //Just letting the user know something's screwed trace("Error Loading XML"); } function LoadXML(e:Event):void{ xmlData = new XML(e.target.data); ParseContent(xmlData); } function ParseContent(contentInput:XML):void { trace("XML Contents"); trace("------------------------"); var numberList:XMLList = contentInput.numberitem; //trace ('length is ' + numberList.length()); gnumber.text = contentInput.gamenumber; trace ("Game Number is " +gnumber.text); for (var i:int = 0; i < numberList.length(); i++) { //trace ("I is " + i); //trace ("List Length is " + numberList.length()); var numberItem:XML = numberList[i]; draw0 = numberList[0]; draw1 = numberList[1]; draw2 = numberList[2]; draw3 = numberList[3]; draw4 = numberList[4]; draw5 = numberList[5]; draw6 = numberList[6]; draw7 = numberList[7]; draw8 = numberList[8]; draw9 = numberList[9]; /*draw2 = numberList[2]; draw2 = numberList[2]; */ //this["num"+ numberList[i] + "Stroke"].visible = false; timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw0].x-15), y:(this["num" +draw0].y+25)}, {rotation:-30}]}), 2); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["num"+ draw0], 1, {visible:false} ), -1.75); timeline.append(TweenMax.to(this["background"+draw0], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw0 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw0 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: 0, yoyo: 1, repeat: 1, delay: 0}), -1.); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ), -.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw1].x-15), y:(this["num" +draw1].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw1], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw1 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw1 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: 0, yoyo: 1, repeat: 1, delay: 0}), -1); /*timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ), -.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw2].x-15), y:(this["num" +draw2].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw2], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw2 + "Stroke"], 1, {visible:true} ),-1.75); timeline.append(TweenMax.to(this["num"+ draw2 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: 0, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw3].x-15), y:(this["num" +draw3].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw3], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw3 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw3 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw4].x-15), y:(this["num" +draw4].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw4], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw4 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw4 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw5].x-15), y:(this["num" +draw5].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw5], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw5 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw5 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw6].x-15), y:(this["num" +draw6].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw6], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw6 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw6 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw7].x-15), y:(this["num" +draw7].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw7], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw7 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw7 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw8].x-15), y:(this["num" +draw8].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw8], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw8 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw8 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw9].x-15), y:(this["num" +draw9].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw9], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw9 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw9 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1);*/ timeline.appendMultiple ( [ TweenMax.to(this["num" +draw0], 1, {alpha:0, delay: -1}), //TweenMax.to(this["num" +draw1], 1, {alpha:0}), /*TweenMax.to(this["num" +draw2], 1, {alpha:0} ), TweenMax.to(this["num" +draw3], 1, {alpha:0} ), TweenMax.to(this["num" +draw4], 1, {alpha:0} ), TweenMax.to(this["num" +draw5], 1, {alpha:0} ), TweenMax.to(this["num" +draw6], 1, {alpha:0} ), TweenMax.to(this["num" +draw7], 1, {alpha:0} ), TweenMax.to(this["num" +draw8], 1, {alpha:0} ),*/ TweenMax.to(this["num" +draw1], 1, {alpha:0} )], 1, TweenAlign.START, 1 ); } }
  14. Hi Jack, I am researching on how to loop or restart the flash movies. I just made a post about it. After posting that I am still digging in to see what I can do and I came across this post. You are 110% correct on simplifying the code. That is exactly how I overcame my situation that we just worked on. It worked on a simplified fla of just that routine I was looking to do. But when I went to append it into my original fla, it broke and I could not figure out why. So, I rebuilt from the working model and I am so close to completion. It saved me hours of trouble shooting and searching once I simplified it. I just wanted to give my 2 cents on that one. Thanks! I understand how complex a project can get and it can seem incredibly difficult to pull things apart and simplify. However, in my experience, it is by far the best way to troubleshoot an issue like this. I'm not saying for us on the forum to troubleshoot your issue - I'm saying when I personally struggle on my own project to understand a problem, I usually isolate the general process in a separate simplified FLA and slowly build up until it breaks so that I can isolate the issue. Often there are a bunch of complexities in your code that have nothing to do with the problem, so pulling it apart and doing the most basic, simple thing to begin with an slowly layering the complexities usually forces the problem to bubble to the surface more quickly than trying to avoid the work of creating the simplified FLA and sticking with the files that have 4 months worth of code crammed in. But if it's impossible to post any example or isolate your stuff into a separate FLA, so be it. I followed most of your pseudo code until the end. I don't know what the "Main Tween" refers to or what exactly the onCompletes are doing or why you seem to be using tweens just to figure out a position or what exactly the path is (a CirclePath2D?). This could all just be a limitation of my ability to visualize things - it's not necessarily that you explained them poorly. But without seeing real code or any example, and not having files to add trace() statements to, etc., I'm afraid I can't be of much assistance. For the record, CirclePath2D has methods in it that allow you to render an object at a specific progress point - you don't have to build a tween to figure it out. See the docs for details. And I think your "hack" in CirclePath2D needs to factor in a lot more in terms of the geometry (not just x + width / 2. If I understand your goal (which may not be the case), you need to adjust the radius of the circle based on your objects' size and plug that into the equations.
  15. I made some progress this weekend. The code did not come out the way I thought it would but I am getting the results that I wanted and there doesn't seem to be a performance issue other than the initial load. There seems to be a 2 second delay but that is no big deal. I am now able to utilize tweenMax and timelineMax to somewhat dynamically tween my symbols based on values of an xml file. It took me a a while to overcome that hurdle but it got me to the next stage. At the beginning of my movie there is a counter that counts down, at the end of the counter it loads the xml file and tweens the data. After the last data is tweened, it needs to go back to the counter and start the whole process over. There will be a new xml file ready before the timer gets to 00:00 again. My problem is I can not seem to make it loop. I have tried the gotandplay with no avail. Any suggestions? I am also not quite understanding how the event listeners work so I am reading up on those as well. I understand the purpose just not how to write the listeners. This may be a viable solution as well. Here is my newest tween code. This is in a function that gets called for loading the xml data. I have a separate timer function and a function that makes all the symbols hidden that I don't need which clears the main stage for the tweening. timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw0].x-15), y:(this["num" +draw0].y+25)}, {rotation:-30}]}), 2); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["num"+ draw0], 1, {visible:false} ), -1.75); timeline.append(TweenMax.to(this["background"+draw0], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw0 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw0 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: 0, yoyo: 1, repeat: 1, delay: 0}), -1.); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ), -.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw1].x-15), y:(this["num" +draw1].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw1], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw1 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw1 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: 0, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ), -.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw2].x-15), y:(this["num" +draw2].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw2], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw2 + "Stroke"], 1, {visible:true} ),-1.75); timeline.append(TweenMax.to(this["num"+ draw2 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: 0, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw3].x-15), y:(this["num" +draw3].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw3], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw3 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw3 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw4].x-15), y:(this["num" +draw4].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw4], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw4 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw4 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw5].x-15), y:(this["num" +draw5].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw5], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw5 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw5 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw6].x-15), y:(this["num" +draw6].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw6], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw6 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw6 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw7].x-15), y:(this["num" +draw7].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw7], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw7 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw7 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw8].x-15), y:(this["num" +draw8].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw8], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw8 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw8 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.append(TweenMax.to(kenoBall, 1, {x:1364.75, y:90, rotation:0})); timeline.append(TweenMax.to(kenoBall, .70, {alpha : 1} ),-.25); timeline.append(TweenMax.to(kenoBall, 4, {bezier:[{x:600, y:-150}, {x:(this["num" +draw9].x-15), y:(this["num" +draw9].y+25)}, {rotation:-30}]})); timeline.append(TweenMax.to(kenoBall, 1, {alpha : 0} )); timeline.append(TweenMax.to(this["background"+draw9], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw9 + "Stroke"], 1, {visible:true} ), -1.75); timeline.append(TweenMax.to(this["num"+ draw9 + "Stroke"], 1, {scaleX: 2.5, scaleY: 2.5, z: -10, yoyo: 1, repeat: 1, delay: 0}), -1); timeline.appendMultiple ( [ TweenMax.to(this["num" +draw0], 1, {alpha:0, delay: -1}), TweenMax.to(this["num" +draw1], 1, {alpha:0}), TweenMax.to(this["num" +draw2], 1, {alpha:0} ), TweenMax.to(this["num" +draw3], 1, {alpha:0} ), TweenMax.to(this["num" +draw4], 1, {alpha:0} ), TweenMax.to(this["num" +draw5], 1, {alpha:0} ), TweenMax.to(this["num" +draw6], 1, {alpha:0} ), TweenMax.to(this["num" +draw7], 1, {alpha:0} ), TweenMax.to(this["num" +draw8], 1, {alpha:0} ), TweenMax.to(this["num" +draw9], 1, {alpha:0} )], 1, TweenAlign.START, 1 ); Thanks!
×
×
  • Create New...