Quantcast
Channel: Adobe Community : All Content - Adobe Animate CC - General
Viewing all articles
Browse latest Browse all 13519

Preload a .SWF with Javasript?

$
0
0

Does it have any effect on the playback of a .swf?

 

What if I simply use a script like this?

 

<script type="text/javascript">

if (document.images) {

    img1 = new Image();

    img1.src = "presentation.swf";

}

</script>

 

I've noticed that my .swf performs better after playing it once - I assume this is due to the fact that's it's been downloaded and cached by the browser...?

 

http://www.thomashanserdesign.com#flash

 

For a short Flash piece like this, I'm not going to bother with a Flash "preloader." I just thought using a Javascript would load the .swf in its entirety and help improve the performance.  (It tends to slow down near the end of the video, before the logo appears at the end.)

 

Comments?


Viewing all articles
Browse latest Browse all 13519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>