Stream Error AWD over WWW

Software: Away3D 4.x

frogman_pep, Newbie
Posted: 23 August 2012 02:54 AM   Total Posts: 19

This page is a rotating AWD character with texture exported from 3DS MAX 2012 that works locally, but when uploaded to the web the #2032 Stream Error: URL: http://frogmandesignz.com/away3d/gyroscope/model/Character.AWD is thrown.  Which if you go to the model directory you’ll see the ‘Character.AWD’ file.

package{
 import away3d
.cameras.Camera3D;
 
import away3d.containers.Scene3D;
 
import away3d.containers.View3D;
 
import away3d.controllers.HoverController;
 
import away3d.loaders.Loader3D;
 
import away3d.loaders.parsers.Parsers;
 
 
import flash.display.Sprite;
 
import flash.display.StageAlign;
 
import flash.display.StageScaleMode;
 
import flash.events.Event;
 
import flash.events.MouseEvent;
 
import flash.geom.Vector3D;
 
import flash.net.URLRequest;
 
 
[SWF(backgroundColor="#000000"frameRate="60"quality="LOW")]
 
 
public class Gyro2 extends Sprite {
  
  
  
private var _view:View3D;
  private var 
_scene:Scene3D;
  private var 
_camera:Camera3D;
  private var 
_loader:Loader3D;
  private var 
hoverController:HoverController;
  private var 
_prevMouseX:Number;
  private var 
_prevMouseY:Number;
  
  public function 
Gyro2(){
   
   Parsers
.enableAllBundled();   
   
setup3d();
  
}
  
  
private function setup3d():void{
   
   stage
.scaleMode StageScaleMode.EXACT_FIT;   
   
   
_view addChild(new View3D()) as View3D;
   
_view.antiAlias 4;
   
_view.backgroundColor 0x000000;
   
_view.width 600;
   
_view.height 400;
   
_scene _view.scene;
   
_camera _view.camera;
   
_camera.lens.far 5000;
   
_camera.lens.near 20;
   
   
hoverController = new HoverController(_camera);
   
hoverController.tiltAngle 0;
   
hoverController.panAngle 180;
   
hoverController.minTiltAngle = -60;
   
hoverController.maxTiltAngle 60;
   
   
stage.addEventListener(MouseEvent.MOUSE_DOWNonStageMouseDown);
   
stage.addEventListener(MouseEvent.MOUSE_MOVEonStageMouseMove);
   
stage.addEventListener(MouseEvent.MOUSE_WHEELonStageMouseWheel);
   
   
_loader = new Loader3D(truenull);
   
_loader.load( new URLRequest("model/Character.AWD"));
   
_scene.addChild_loader );
   
_loader.scaleX _loader.scaleY _loader.scaleZ 6;
   
_loader.= -250;
   
_loader.100;
   
   
addEventListenerEvent.ENTER_FRAMErender );
  
}  
  
  
private function onStageMouseDown(event:MouseEvent):void{
   
   _prevMouseX 
event.stageX;
   
_prevMouseY event.stageY;
  
}
  
  
private function onStageMouseMove(ev:MouseEvent):void{
   
   
if (ev.buttonDown{
    hoverController
.panAngle += (ev.stageX _prevMouseX);
    
hoverController.tiltAngle += (ev.stageY _prevMouseY);
   
}
   
   _prevMouseX 
ev.stageX;
   
_prevMouseY ev.stageY;
  
}
  
  
private function onStageMouseWheel(ev:MouseEvent):void{
   
   hoverController
.distance -= ev.delta 5;
   
   if (
hoverController.distance 100)
    
hoverController.distance 100;
   else if (
hoverController.distance 2000)
    
hoverController.distance 2000;
  
}
  
  
private var _angleX:Number 0;
  private var 
_angleY:Number 0;
  private var 
_angleZ:Number 0;
  
  
  
  private function 
rendere:Event ):void{
   
   _camera
.lookAt(new Vector3D());
   
_view.render();
  
}
  
 }

Going to see if any traces reveal some hints, because everything I looked up hasn’t helped.

Any ideas, questions, solutions?

 

   

Ivan Moreno, Newbie
Posted: 23 August 2012 07:54 AM   Total Posts: 22   [ # 1 ]

Hello,

Take a look in this thread: AssetContextLoader. Try the solutions explained in there and if the problem persists please write back.

Cheers,

   

Richard Olsson, Administrator
Posted: 23 August 2012 10:07 AM   Total Posts: 1192   [ # 2 ]

Try browsing to the URL that you just said was working:
http://frogmandesignz.com/away3d/gyroscope/model/Character.AWD

That returns a 404. Maybe your server isn’t configured to properly serve files with the .awd suffix?

Also, please make it a habit to always post the full error message, not just bits and pieces from it.

   

frogman_pep, Newbie
Posted: 23 August 2012 03:26 PM   Total Posts: 19   [ # 3 ]

Thanks both of you guys.  Richard that was pretty much the solution.  Needed to edit web.config file to accept a custom mime type. 

Had a feeling it was something like that, had to create a custom mime type a few years back, too bad I couldn’t remember it sooner than later.  And yes I should’ve put the whole error message, will do so in the future.  Will update this post in a few with the exact solution, but for now THANKs.

   

frogman_pep, Newbie
Posted: 23 August 2012 06:41 PM   Total Posts: 19   [ # 4 ]

So what was needed was to edit the web.config file.  Here’s the page with a little more info.

What I entered in was:

<mimeMap fileExtensi mimeType="video/awd"/> 

I tried ‘application’ instead of ‘video’ at first and it worked initially but then my whole site was unavailable the second time I checked.

Thanks again, ttys.

[EDIT] fileExtension=”.awd” is getting truncated for some reason, tried editing several times now [EDIT]

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X