This content has been marked as final. Show 9 replies
if you want to stop all the timelines in _levelN you can use:
How fun is that! Nice. The way you are scripting the animation is very old school – nothing wrong with that. I'm just wondering if it contributes to slow down. Here is how I tried it out. I just made a clip call "ball" in the library and set its linkage to export for actionscript with the name "ball." Of course it is just a simple gradient. I then attach as many as I need to the stage setting an interval for each one. The intervals could be canceled using a clearInterval(theClip.myInt) and reset whenever needed.
Really I don't know if this is any better, just different and maybe it will give you some ideas.
Whoops. Forgot to attach it.
That seems like a neat idea. Do you set different intervals for different balls.
I didn't for this little experiment, but you certainly could. Or you could cycle through, kill all the original intervals, and assign slightly longer ones to the ones in back. There are lots of ways to go with it.
-- Rothrock.. . nice code..i tried it out on my balls and its neat (that didn't sound so great :). . .but the randomness won't fit my layout as I need to position each ball you see.. . .buUut, it was a good insight into what is possible, thanks for that. I'll see what we can decypher from that... .merci
-- kGlad... .I'm going to see how that works now. thx. I'm assuming I can simply apply that to a button on the stage correct ?
thanks again guys, I'll try to let you guys know when it's finished.. .
minicat – That was just my way of testing. What you could do is place your balls on the stage with names bola0, bola1, etc. Then just change the for loop like sich:
Or whatever you need. That way you can have the visual ease of placing them where you want them in the authoring environment, but still the ease of all the code in one place.
And certainly I'm not saying that my way is better. It is just how I would attack the problem.
Kglad's code should just be placed on a frame of whatever timeline you need. The first line is how you invoke it, so that part can be separate from the function itself. Also the function isn't defined as a global function so if you put the code in some strange place and the button is buried in a clip inside a clip on another level, etc. you may have trouble with scope.
Otherwise something like this should work:
//code to start loading the other stuff in to _level25
//any other code you want
Hi...hope I'm not offending you by posting this, but I just noticed a grammar mistake and thought you might want to have it pointed out. In Casey Jenning's quote: "If you're giving it your all, fear cannot enter the equation." On your page, note that the first "your" should be "you're."
I'm known for my typos :)..thanks...no offenses taken :) I let other people worry about that stuff :)