Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Movie Clip Laggn my pc.. 1

Status
Not open for further replies.
Well doesn't seem to be bogging down mine!
What's your set up?

Regards,
new.gif
 
800 mhz, 256 of rdram, p3

my friends is
1.4 ghz, 486 ram, p4

and it's lagging him down to..
 
Fine on mine too, 750(?), P3, around 390 RAM.... funkymonk B-)

rod@sameplanet.co.uk
********************


 
weird.. check your processor speeds.
 
My processor speed is 800 mhz. funkymonk B-)

rod@sameplanet.co.uk
********************


 
no no.. what os do you have? If you have win2k press ctrl alt delete and go to task manager/processes.. tellme what % you're at.
 
Ok, sorry about that, not sure what I'm looking at here so I'll give you a few readings.

In task manager/processes, FlashPla.exe = 4,460k mem usage;
In performance = 97-99% CPU Usage.


Both are taken with the test.swf running and focused.

Not a very techie person I'm affraid, are these the readings you wanted?
funkymonk B-)

rod@sameplanet.co.uk
********************


 
Performance very acceptable on my box too (p3 1.7, 256). I think I see what you mean though--when I up the frame rate to 60, it chugs a little when all tweens are moving at once. It's a handicap of flash. Try using fewer tweens at once, play around with frame rate (modify->movie), reduce graphics quality, and/or shorten the tween length. Those sorts of things.

 
Alternatively you can script the motion - here's something that will do something simliar to the effect you had. Rename your "fp" graphic to "original" and drag it off the stage then add this code to an empty movieclip:

onClipEvent (load) {
for (i=1; i<=10; i++) {
duplicateMovieClip (_root.original, &quot;fp&quot;+i, i);
clip = _root[&quot;fp&quot;+i];
clip.targetHeight = 50;
clip.startHeight = 350;
clip.speed = Math.ceil(Math.random()*5);
clip.scale = Math.ceil(Math.random()*60)+40;
clip.delay = getTimer()+Math.ceil(Math.random()*7500);
clip._xscale = clip._yscale=clip.scale;
clip._y = startHeight();
}
}
onClipEvent (enterFrame) {
for (i=1; i<=10; i++) {
clip = _root[&quot;fp&quot;+i];
if (clip._y>clip.targetHeight && clip.delay<getTimer()) {
clip._y -= clip.speed;
}
}
}

It gives a random setting to several versions of the graphic and they make their way up the screen via scripted movements - it's often less processor intensive than multiple tweens. Slainte

 
That's really nice wangbar--it's not my question, but you deserve the star.
 
What do I do with the empty movie clip that has the actions?
 
What do I do with the empty movie clip that has the actions? I put the action movie clip into the main scene and I'm getting this error..

Symbol=acton, Layer=Layer 1, Frame=1: Line 1: Clip events are permitted only for movie clip instances
onClipEvent (load) {

Symbol=acton, Layer=Layer 1, Frame=1: Line 14: Clip events are permitted only for movie clip instances
onClipEvent (enterFrame) {
 
Create a new movie clip. Drag it on stage but off the visible part of it, on the side or something, though in this case, since there's nothing in it, it could be on stage and you wouldn't see it anyways. Right click the small circle and select Actions from the popup menu.
Now add the code posted by Wangbar and you won't get that error message, since your applying the actions to a movie clip. The onClipEvent can only be applied to a movie clip, not a frame or a button. In this case, it's what we would call a control clip.

Regards,
new.gif
 
ok, I'm now not getting that error but I'm getting a warning from my pc..

Flash Player

A script in this movie is causing flash player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?

YES NO

 
THat's most probably because you're somehow entering an endless loop! Haven't tried Wang's code, but are you sure it's coming from his code? Have you added anything else and have you carefully copied & pasted his code into your movie?
I would delete anything else than his code, and re-try it.
If I have a few minutes, I might try it myself!

Regards,
new.gif
 
I did it just the way u guys said. No extra code or animations.
 
That loop is probably because:

a) you haven't renamed the instance of the clip you want to duplicate to &quot;original&quot;.

or

b) the clip you want to duplicate is not on the main timeline/_root level. Slainte

 
It was option a. I got it working but I'm still getting cpu lag.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top