简体   繁体   English

在Animate CC上添加预加载器

[英]Adding Preloader on Animate CC

I'm new in Adobe Animate. 我是Adobe Animate的新手。 Is there a way for adding a preloader for loading image assets when creating a Canvas in Adobe Animate CC? 在Adobe Animate CC中创建画布时,是否可以添加用于加载图像资源的预加载器的方法? Is it the same way as inserting the loadqueue class on the html file after the Animate CC has published the html and js? 这与在Animate CC发布html和js之后在html文件上插入loadqueue类的方式相同吗?

Basically you create two manifests to load - one with assets for preloader and the other with the rest of the assets. 基本上,您创建了两个要加载的清单-一个包含用于预加载器的资产,另一个包含其他资产。
First you load assets needed for preloader, add the preloader on stage and then you start loading the rest of assets and change the preload indicator on "progress" event. 首先,加载预加载器所需的资产,在舞台上添加预加载器,然后开始加载其余资产,并在“进度”事件中更改预加载指示器。

One way to do this is to create 2 projects in Animate CC inside one folder (let's call them preloader.fla and content.fla ). 一种方法是在Animate CC中的一个文件夹中创建2个项目(我们将其称为preloader.flacontent.fla )。 When you publish you will get a js file and html file for each project and a shared folders for images and sounds. 发布时,您将获得每个项目的js文件和html文件,以及用于图像和声音的共享文件夹。
What you have to do next is open the html file created for preloader and paste some code from content.html , which includes importing the js file and loading the manifest. 接下来,您需要打开为预加载器创建的html文件,并从content.html粘贴一些代码,其中包括导入js文件和加载清单。
If you do it all right, opening the preloader.html will first load the preloader, then add it to stage, load the rest of assets (while indicating progress) and add the next screen when it's complete. 如果一切正常,打开preloader.html将首先加载预加载器,然后将其添加到舞台上,加载其余资产(同时指示进度),并在完成时添加下一个屏幕。

Preloaders support for HTML5 canvas has been added in the 15.2 released version of Animate CC. 在15.2发布的Animate CC版本中添加了对HTML5 canvas的预加载器支持。 It lets you choose and set a GIF file as preloader and all the handling is taken care of automatically. 它使您可以选择GIF文件并将其设置为预加载器,并且所有处理都会自动进行。

See here for details: https://helpx.adobe.com/animate/using/whats-new.html#preloader 详情请参阅这里: https : //helpx.adobe.com/animate/using/whats-new.html#preloader

https://helpx.adobe.com/content/help/en/animate/using/creating-publishing-html5-canvas-document.html#main-pars_header_1987795350 https://helpx.adobe.com/content/help/en/animate/using/creating-publishing-html5-canvas-document.html#main-pars_header_1987795350

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM