Skip to main content
danielo33771543
Known Participant
August 7, 2019
Answered

'JSFL script running for a long time' - how do i stop this

  • August 7, 2019
  • 3 replies
  • 4410 views

does anyone know how i can fix this issue, even when i CLICK yes the message keeps poping up

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

This is probably happening because you're trying to export a very complex project. Meaning lots of complex vector artworks, lots of bitmaps are being generated, lots of shape tweens, and motion tweens. Also these bitmaps may have huge dimensions.

Here are some perfomance tips that you should be aware of:

- Try testing your file with and without exporting the document as texture (Publish Settings > JavaScript/HTML > Image Settings > Export document as texture);

- Consider turning off the advanced layers mode (Ctrl/Cmd + J) if you don't need advanced features like camera or parenting because this mode has some impact on performance;

- Avoid complex containers with lots of children;

- Avoid complex shapes;

- Make sure you're not using color effects/filters;

- Use cache whenever possible;

- Avoid using large bitmaps. This is specially true for mobile devices;

- Try low resolution values for exported bitmaps (Publish Settings > JavaScript/HTML > Image Settings > Resolution);

- Try to balance wisely when an asset should be made of a vector shape or of a bitmap;

- Avoid using too many static text fields because they are exported as raw vector shapes;

- Avoid adding too many listeners;

- Add mouse events to a container and use the event.target property instead of adding a separate mouse event to dozens or hundreds of children;

- If possible set a container.tickChildren to false so the tick will not be propagated to children of a container;

- If using a tick event it may be a good idea to change the Ticker.timingMode and see which one works best for your case;

- Avoid using motion tweens because they are exported as frame by frame animation;

- Avoid having a huge main timeline with lots of tweens;

- Avoing very large shape tween spans.

Also, is it possible for you to update to the latest release of Animate CC? It may help.

Here is a screenshot of a complex project I worked this year that I used to get similiar errors like yours very frequently. The errors only went away when I optimized all FLAs.

Regards,

JC

3 replies

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
August 7, 2019

Hi.

This is probably happening because you're trying to export a very complex project. Meaning lots of complex vector artworks, lots of bitmaps are being generated, lots of shape tweens, and motion tweens. Also these bitmaps may have huge dimensions.

Here are some perfomance tips that you should be aware of:

- Try testing your file with and without exporting the document as texture (Publish Settings > JavaScript/HTML > Image Settings > Export document as texture);

- Consider turning off the advanced layers mode (Ctrl/Cmd + J) if you don't need advanced features like camera or parenting because this mode has some impact on performance;

- Avoid complex containers with lots of children;

- Avoid complex shapes;

- Make sure you're not using color effects/filters;

- Use cache whenever possible;

- Avoid using large bitmaps. This is specially true for mobile devices;

- Try low resolution values for exported bitmaps (Publish Settings > JavaScript/HTML > Image Settings > Resolution);

- Try to balance wisely when an asset should be made of a vector shape or of a bitmap;

- Avoid using too many static text fields because they are exported as raw vector shapes;

- Avoid adding too many listeners;

- Add mouse events to a container and use the event.target property instead of adding a separate mouse event to dozens or hundreds of children;

- If possible set a container.tickChildren to false so the tick will not be propagated to children of a container;

- If using a tick event it may be a good idea to change the Ticker.timingMode and see which one works best for your case;

- Avoid using motion tweens because they are exported as frame by frame animation;

- Avoid having a huge main timeline with lots of tweens;

- Avoing very large shape tween spans.

Also, is it possible for you to update to the latest release of Animate CC? It may help.

Here is a screenshot of a complex project I worked this year that I used to get similiar errors like yours very frequently. The errors only went away when I optimized all FLAs.

Regards,

JC

danielo33771543
Known Participant
August 7, 2019

thanks alot, so what i did i decide to seperate my animate files from 181 frames to 3 seperate animate files. and it worked. The main issue was the complex shapes.

JoãoCésar17023019
Community Expert
Community Expert
August 7, 2019

Excellent! You're welcome. I'm glad you managed to solve the issue.

Regards,

JC

Vladin M. Mitov
Inspiring
August 7, 2019

Hi,

I think, that the command showIdleMessage() applies to all subsequent code, until you invoke it again.

So, you can create two command files - one to disable the "idle messages" and one to enable them again. Then:

- manually execute the first command fl.showIdleMessage( false );

- after that, run your export procedure (the encrypted file)

- when the export finished, run the second command fl.showIdleMessage( true );

Maybe this will work

- Vlad: UX and graphic design, Flash user since 1998Member of Flanimate Power Tools team - extensions for character animation
Legend
August 7, 2019

Another guy was having the same problem. Maybe you two could help each other out:

How can i fix this

n. tilcheff
Legend
August 7, 2019

Same guy, double poster.

Nick - Character Designer and Animator, Flash user since 1998 | Member of the Flanimate Power Tools team - extensions for character animation
danielo33771543
Known Participant
August 7, 2019

same guy...had to repost it to see if some got a solution