Need help! Cannot get awd file on the webserver

Software: Away3D 4.x

Helvdan, Newbie
Posted: 13 March 2013 09:44 PM   Total Posts: 3

Sorry if i have duplicate the similar topic on this forum and for my bad English. I ve exported awd from 3ds max 2012, and successfully include them to flash develop project.

AssetLibrary.enableParser(AWD2Parser);
   
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETEonAssetComplete);
   
AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETEonResourceComplete);
   
AssetLibrary.addEventListener(LoaderEvent.LOAD_ERRORonLoadError);
   
AssetLibrary.load(new URLRequest(MESH_URL));
   
AssetLibrary.load(new URLRequest(TEXTURE_URL)); 

There is no animation inside, only simple meshes and textures. Everything is all right when i start in debug player. But it not works at the hosting. The main .swf cannot load .awd file (i traced this in the code above). My hosting works under apache server, so i added new mime type for .awd:

ErrorDocument 404 /error-docs/404.php
ErrorDocument 403 
/error-docs/403.php

Options 
+FollowSymLinks
RewriteEngine On
RewriteCond 
%{HTTP_HOST} ^www.mebel-to.ru[NC]
RewriteRule 
^(.*)$ http://mebel-to.ru/$1 [R=301,L]

AddType application/awd .awd
AddCharset utf
-.css .less .js .xml .json .rss .atom
<IfModule mod_headers.c>
  
Header set X-UA-Compatible "IE=Edge,chrome=1"
  
# mod_headers can't match by content-type, but we don't want to send this header on *everything*...
  
<FilesMatch ".(js|css|less|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf|awd)$" >
    
Header unset X-UA-Compatible
  
</FilesMatch>
</
IfModule>
<
files *.less>
SetOutputFilter DEFLATE
</files

I would be glad to any help, thanks:)

   

Avatar
Fabrice Closier, Administrator
Posted: 13 March 2013 10:39 PM   Total Posts: 1265   [ # 1 ]

You need to add the mime type (the extension.awd) on your server.
On my server I add to root a “web.config” file. It would look like this to add awd.

<?xml version=“1.0” encoding=“UTF-8”?>
<configuration>
  <system.webServer>
      <staticContent>
        <mimeMap fileExtensi mimeType=“text/plain” >
      </staticContent>
  </system.webServer>
</configuration>

somehow I cannot paste the xml in this forum.
line should be
mimeMap fileExtension= “.awd” mimeType=“text/plain”
Google it smile

   

Helvdan, Newbie
Posted: 14 March 2013 06:15 AM   Total Posts: 3   [ # 2 ]

Thank you, it works!!!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X