Reputation: 18589
that.preloadQueue.loadManifest([
{ id: 'ball', src: '/swf/ball.swf' },
]);
Then I use swfobject
and just use the normal filepath of '/swf/ball.swf'
. Currently it does not preload, but instead reloads each time.
How should I change it?
Upvotes: 0
Views: 83
Reputation: 11294
There is no SWF-based preloading available for PreloadJS. If the file extension is not recognized, the file will be loaded as plain text via XHR, and will therefore not be stored in the browser cache. When the Embed/Object is created in HTML, it will need to load it again from scratch, so the preload is just overhead.
In order to support SWF loading, a "SWFLoader" plugin would have to be created which properly loads the SWF using SWFObject or something similar. Due to the lack of Flash on the web these days, I don't think official support will ever be added to PreloadJS, unless there is overwhelming requests for it. Feel free to log a request on GitHub.
[edit: Looks like you filed a request already]
Upvotes: 1