简体   繁体   中英

Is It Possible To Reference Flex Libraries Without Building Them Into The Flex 4 Project?

Is it possible to build a flex 4 application that references or uses the flex 4 libraries (or any libraries that are compatible) without the project compiling them into the main SWF of the project.

So in a nut shell, I have a project and I want to load the flex 4 library from the server, is this possible? I've seen articles on compiler settings. Could this be the solution to loading the library from the server?

It's possible and advised !

  • Right click on your project -> Properties
  • Flex Build Path -> Library Path
  • Set Framework Linkage to Runtime Shared Library (or expand each .swc and configure the linkage type).
  • Expand each Flex framework SWC and Edit Linkage Type
  • Click Add ... and add both swf and swz versions of the library, example :
 framework_4.0.x.xxx.swf framework_4.0.x.xxx.swz 

SWZ is an Adobe signed version of the library which can be stored in the Flash Player and is not subject to browsers cache purges. You have to allow your webserver to serve .SWZ files, so add a mimetype application/x-swz or application/x-shockwave-flash in your Apache/IIS.

The SWF version is used for failover, but will be purged in case the user clean his cache.

You'll find the .swz and .swf files in your bin-debug/bin-release after a build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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