LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
  #1  
Old 05-06-2002, 01:16 PM
friday friday is offline
Registered User
 
Join Date: Aug 2000
Posts: 8
Rep Power: 0
friday is on a distinguished road
[help] script makes flash go really slow!

I've made this website using FLASH 5, but meanwhile I've upgraded to FLASH MX.

The website can be seen here:
http://www.cuba2003.org/

The problem is that the website goes really slow on slower processors (eg. PII or even PIII). I guess I know how it comes, I'm using the next script (or similar) for a LOT of movie clips:

whl = _parent.MC1._x;
wwzl = _parent.MC2._x;
whl = wwzl+((whl-wwzl)/0.7);
_parent.MC2._x = whl;

As there's no real limit set on this script it keeps checking for ever i guess?? A lot of these thrown together probably cause the flash movie to perform really slow.

How can I speed it up?

Thanx.
  #2  
Old 05-09-2002, 11:47 AM
damn damn is offline
Registered User
 
Join Date: Apr 2001
Posts: 73
Rep Power: 13
damn is on a distinguished road
i've been looking for a way to stop looping that script as well but mostly it isn't that simple. i have not found a GOOD way to do it yet. can anyone help us out
  #3  
Old 05-09-2002, 02:41 PM
dv8's Avatar
dv8 dv8 is offline

Admin Mod
 
Join Date: Mar 2001
Posts: 2,053
Rep Power: 15
dv8 is on a distinguished road
MX has a simple way of not needing 'onClipEvent's...
and a developer can set a limit to how many times the script can be run
Example
Actionscript:
// Simple Incrementing Script
i=0;
function limit_iCount () {
	i++;
	trace(i);
	if (i > 200) {
		clearInterval(i_count);
	}
}
i_count = setInterval(limit_iCount, 50);
stop();
Using an identified 'setInterval' I can call this function only 200x at 50 milliseconds.
Function is still available for reuse too!

Also, you may want to call a function with Arguments... so you don't really need to have a repetitive code in every MC.
That can increase Performance on a given machine.
  #4  
Old 05-09-2002, 02:51 PM
damn damn is offline
Registered User
 
Join Date: Apr 2001
Posts: 73
Rep Power: 13
damn is on a distinguished road
Thanks,
I definitely should start looking deeper into flash mx.
How exactly can we use the code you shared us, in combination with the code friday gave us? So that the script doesn't run for ever?
Would be very helpful.
  #5  
Old 05-09-2002, 03:24 PM
dv8's Avatar
dv8 dv8 is offline

Admin Mod
 
Join Date: Mar 2001
Posts: 2,053
Rep Power: 15
dv8 is on a distinguished road
I'd need a broader look on how that section of script works, but I'm sure it can be done!
  #6  
Old 05-09-2002, 03:35 PM
damn damn is offline
Registered User
 
Join Date: Apr 2001
Posts: 73
Rep Power: 13
damn is on a distinguished road
Well, it is 'sham bangal' code.

Here's an example:

whereweare = this._x;
wherewego = MC._x;
wherewego=whereweare+((wherewego-whereweare)/2);
this._x = wherewego;


It makes 'this' move to the _x of MC. The closer 'this' comes to MC the slower it proceeds.

I guess the problem is that the script keeps performing, even if 'this' is already at the position of MC.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Jobs for Flash Developer/Action Script 2.0 or 3.0 praveenrecs Work/Job Opportunities 1 11-24-2008 02:05 PM
Flash Encrypt protects action script sintrix.com New Softwares 4 08-08-2007 05:07 AM
[Help] Optimizing page loading performance of large flash lmheah Flash MX 1 07-29-2005 04:47 AM
Flash news scroller and php news script?? kiwiboy14 Newbies 2 10-22-2004 08:22 AM
Flash Script let my computer slow ? jenzis Newbies 2 09-11-2000 09:10 PM




All times are GMT. The time now is 12:21 PM.