Undefined Property viewport in Stage3D

Software: Away3D 4.x

Avatar
jansensan, Newbie
Posted: 30 January 2012 03:45 PM   Total Posts: 16

Hello guys, I have been able to create a couple of Away3D 4 projects so far, but now I hit a wall and I need other eyes than mine to see where I have failed. As I understand, it fails at compilation time, see the message:

Starting Launcher Tutorial - Fit Away3D Plane Full Viewport.

Starting Full Build of Tutorial - Fit Away3D Plane Full Viewport.
Compiler arguments:
  -output
  /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/www/assets/swf/main.swf
  -+flexlib=
  /Users/jansensan/Documents/Development
  Tools/Flex SDKs/4.6.0.23201B (Fix
  for FDT)/frameworks
—compiler.debug=true
—debug-password=
—compiler.source-path+=
  /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/src,
  /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/libs/away3d-v4.0.0/src
—compiler.library-path+=
  /Users/jansensan/Documents/Development
  Tools/Flex SDKs/4.6.0.23201B (Fix
  for
  FDT)/frameworks/libs/player/11.1/playerglobal.swc,
  /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/libs/apparat-lzma-decoder/apparat-lzma-decoder-1.0.RC8.swc
  -static-link-runtime-shared-libraries=
  true
  -target-player=11.1
  -library-path+=
  /Users/jansensan/Documents/Development
  Tools/Flex SDKs/4.6.0.23201B (Fix
  for FDT)/frameworks/locale/en_US
  -default-size=640,360
  -swf-version=13
  -static-link-runtime-shared-libraries=
  true
  -target-player=11.1
  -library-path+=
  /Users/jansensan/Documents/Development
  Tools/Flex SDKs/4.6.0.23201B (Fix
  for FDT)/frameworks/locale/en_US
  -default-size=640,360
  -swf-version=13

  /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/src/Main.as

INFO Loading configuration file /Users/jansensan/Documents/Development Tools/Flex SDKs/4.6.0.23201B (Fix for FDT)/frameworks/flex-config.xml

ERROR /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/libs/away3d-v4.0.0/src/away3d/core/managers/Stage3DProxy.as[43:13]:
Access of possibly undefined property viewPort through a reference with static type flash.display:Stage3D.

  _stage3D.viewPort = new Rectangle(0, 0, 1, 1);

ERROR /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/libs/away3d-v4.0.0/src/away3d/core/managers/Stage3DProxy.as[101:20]:
Access of possibly undefined property viewPort through a reference with static type flash.display:Stage3D.

  return _stage3D.viewPort;

ERROR /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/libs/away3d-v4.0.0/src/away3d/core/managers/Stage3DProxy.as[106:13]:
Access of possibly undefined property viewPort through a reference with static type flash.display:Stage3D.

  _stage3D.viewPort = value;

Pure build time: 2305 ms.
Save compiler information in 0 ms.
Clean compiler information in 0 ms.
Could not create file /Users/jansensan/Documents/Projects/Tutorial_FitAway3dPlaneFullViewport/www/assets/swf/main.swf.
Build failed.

Look at how simple the class is so far:

package 
{
 import away3d
.containers.View3D;

 
import flash.display.Sprite;
 
import flash.display.StageAlign;
 
import flash.display.StageScaleMode;
 
import flash.events.Event;
 
 
 public class 
Main extends Sprite
 {
  
private var _view3D :View3D;
  
  
  
// + ----------------------------------------
  //  [ PUBLIC METHODS ]
  // + ----------------------------------------
  
  
public function Main()
  
{
   initStage
();
   
init();
  
}
  
  
  
private function initStage():void
  {
   stage
.align StageAlign.TOP_LEFT;
   
stage.scaleMode StageScaleMode.NO_SCALE;
  
}
  
  
  
private function init():void
  {
   _view3D 
= new View3D();
   
addChild(_view3D);
   
   
addEventListener(Event.ENTER_FRAMEupdateHandler);
  
}


  
// + ----------------------------------------
  //  [ EVENT HANDLERS ]
  // + ----------------------------------------
  
  
private function updateHandler(event:Event):void
  {
   
if(_view3D_view3D.render();
  
}
 }

I’ve attached a zip of my project, I compare with other projects and really cannot see what parameters I might have set wrong here… Any help? Thanks!

 

File Attachments
fit-plane-full-viewport.zip  (File Size: 313KB - Downloads: 208)
   

Avatar
jansensan, Newbie
Posted: 30 January 2012 07:13 PM   Total Posts: 16   [ # 1 ]

So you can disregard this question, simply redownload the latest version of Away3D from GIT. For some reason, the library I downloaded from the website was not functional, whereas the one from GIT was.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X