Slow external loaded movie 2004-03-10 - By Adrian McTaggart
Back Thank you Jason,
You mention making the bubbles every other frame. Say my movie is 36 fps and I want a bubble about every 2 seconds, how would I adapt the code I have below working to frames?
You ask why don't I use 440-350. The simple answer is there is no reason just not thinking straight! I've now changed it to 90.
Thanks,
Adrian
-- --Original Message-- -- From: Merrill, Jason [mailto:JMerrill@(protected)] Sent: Tuesday, March 09, 2004 5:52 PM To: flashnewbie@(protected) Subject: RE: [Flashnewbie] Slow external loaded movie
This is most likely why you see the slowdown.
Why is this on the onEnterFrame handler? For animation's sake? Could also be done with a for loop, or make the bubbles every other frame or something.
On an unrelated note, you have " * (440 - 350)) + 350 "- just wondering why since its the same as " *90+350 "
Jason Merrill ICF Consulting Government e-Learning Solutions icfconsulting.com
:::>-- --Original Message-- -- :::>From: Adrian McTaggart [mailto:AMacTaggart@(protected)] :::>Sent: Tuesday, March 09, 2004 12:42 PM :::>To: flashnewbie@(protected) :::>Subject: RE: [Flashnewbie] Slow external loaded movie :::> :::> :::>Thanks Andreas, :::> :::>For example in the movie that is being loaded in I have this code: :::> :::>-- ---- ---- ---- ---- ---- ---- :::>onClipEvent(load) { :::> var i = 1; :::> :::>} :::>onClipEvent(enterFrame) { :::> var makeBubbles = (random(26)==2) ? 1:0; :::> if (makeBubbles) { :::> :::>_parent.bubble_mc.duplicateMovieClip("bubble"+i, i); :::> :::> var bubbleX = Math.floor(Math.random() * :::>(240)); :::> var bubbleY = Math.floor(Math.random() * (440 - :::>350)) + 350; :::> setProperty ("_parent.bubble"+i, _x, bubbleX); :::> :::> setProperty ("_parent.bubble"+i, _y, bubbleY); :::> :::> i++; :::> } :::>} :::>-- ---- ---- ---- ---- ---- ---- :::>This duplicates another mc 'bubble_mc' so that there are a :::>continuous stream of bubbles. How would you go about :::>optimising this? :::> :::>Many thanks, :::> :::>Adrian :::> :::> :::> :::>-- --Original Message-- -- :::>From: Andreas Weber [mailto:webweber@(protected)] :::>Sent: Tuesday, March 09, 2004 5:24 PM :::>To: flashnewbie@(protected) :::>Subject: RE: [Flashnewbie] Slow external loaded movie :::> :::> :::>On the code level: :::> :::>Watch out for onEnterFrame handlers, particularily if they :::>contain loops. :::>Sometimes a possible workaround: execute the code in a :::>slower interval. :::> :::>HTH :::>-- ---- ------ :::>Andreas Weber :::>motiondraw.com :::> :::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- :::>-- ------ :::>Supported by Fig Leaf Software :::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- :::>-- ------ :::>Lower Prices for Certified Training! Check out new lower prices for :::>Certified Macromedia Training from Fig Leaf Software. Expand your :::>skill set with courses in ColdFusion, Flash, Rich Internet :::>Applications and .NET in the new year. Fig Leaf Software provides :::>the highest caliber instruction at our training centers in :::>Washington :::>D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at :::>your location. :::> :::>Get the details at http://training.figleaf.com/ :::>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- :::>-- ---- -- :::>To unsubscribe, e-mail: :::>flashnewbie-unsubscribe@(protected) :::>For additional commands, e-mail: :::>flashnewbie-help@(protected) :::> :::> :::> NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited.
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
|
|