简体   繁体   中英

Make flex work offline without a web server

We have an existing app that uses Javascript and embeds flash/flex. We require to make the whole thing work offline at short notice and wonder what the fastest way to make flex work offline is. The offline app in mind would be a window that brings up a web browser with the JS files stored locally. The flex app currently loads mp3 files and data files from the server. Is there any way to make flex load files from the file system automatically without the user having a web server setup? I know it can be done with AIR but we would prefer not to do that. Also if we are forced to use AIR, is it possible to embed an air application in a web page the same way as you embed a flex app? The flex app is embedded seamlessly as shown here:

  1. Go to www.eyespeakpro.com Click on "free trial" after choosing your gender. 2 Then click on "Conversation in daily life" course, click on the first lesson, click "go"
  2. Ignore that lesson and click on the speech bubble 2nd from the left in the bottom right corner. This brings up the flex app, and if you watch the network traffic you can see the files being downloaded if you click the right arrow for the next sentence etc.

Thanks.

You can run a swf file offline. Due security, an swf file is not allowed to load local files. I'm not sure if you use the external interface with javascript. I don't think a local swf have acces to local javascript.

Have a look to the compiler option 'use-network' ( http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7a92.html ) You may set this option to true for loading local files/mp3's

If you only want to show the application local on known computers, you may have a look at the security manager (Flash < 10.3) http://www.macromedia.com/support/documentation/nl/flashplayer/help/settings_manager04.html#117502 to trust a folder or swf on your computer.

For Flash > 10.3 you should have a look at your config panel to trus a swf ( http://www.macromedia.com/support/documentation/nl/flashplayer/help/settings_manager.html )

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