Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
Slow external loaded movie

Slow external loaded movie

2004-03-09       - By Merrill, Jason

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

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)