Topic: Error Embed Tiltviewer-Pro

I get this when I run my Flash+AS3 code.

VerifyError: Error #1053: Substituição ilegal de movePivot em away3d.containers.ObjectContainer3D.
Translated (ReferenceError: Error #1065: The Variable [...] was not defined.)
ReferenceError: Error #1065: A variável ImageGrid_backIcon não foi definida.
ReferenceError: Error #1065: A variável ImageGrid_sndZoom não foi definida.
ReferenceError: Error #1065: A variável ImageGrid_flipIcon não foi definida.
ReferenceError: Error #1065: A variável Image_sndFlip não foi definida.
ReferenceError: Error #1065: A variável ImageGrid_nextIcon não foi definida.
ReferenceError: Error #1065: A variável PanelButton_sndClick não foi definida.
ReferenceError: Error #1065: A variável Image_sndLoad não foi definida.
ReferenceError: Error #1065: A variável Image_flipIcon não foi definida.
ReferenceError: Error #1065: A variável TiltViewer_Logo não foi definida.
ReferenceError: Error #1065: A variável Image_sndSelect não foi definida.

then when I will start the viewer I receive this error.
Tranlated: The variable TiltViewer was not defined.
ReferenceError: Error #1065: A variável TiltViewer não foi definida.
    at global/flash.utils::getDefinitionByName()
    at Preloader/initMainApp()
    at Preloader/onEnterFrame()

Sorry for the errors in portuguese, My flash translate them automatically.

I'm using AS3 Object Oriented and I'm following exactly your examples.

Edit:
I'm using Away3D too there's a problem with?

Last edited by iuri.andreazza (2009-09-16 17:29:06)

Re: Error Embed Tiltviewer-Pro

Hi,

did you look at the Flash embed example that comes with TiltViewer-Pro?

Felix Turner
SimpleViewer Support Team.

Re: Error Embed Tiltviewer-Pro

yep.

I change the way that I'm loading.


the strutcture looks like:

Galery.fla -> Use Galery.as as main Class

package lib {
    
    import flash.display.*;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLRequest; 
    
    public class Galery extends MovieClip {
        
        var ldr:Loader = new Loader();
        
        public function Galery():void {
            if (stage) {
                this.init();
            }else {
                this.addEventListener(Event.ADDED_TO_STAGE, this.init);
            }
        }
        
        public function init(e:Event = null):void {
            trace('wtf! começa a carregar');
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align     = StageAlign.TOP_LEFT;    
            
            addChild(ldr);
            var url:String = "TiltViewer.swf"; 
            var urlReq:URLRequest = new URLRequest(url);
            ldr.load(urlReq);
            
            ldr.contentLoaderInfo.addEventListener(Event.INIT, setOptions);
            trace('wtf! setupou tudo');
        }
        
        
        public function setOptions(e:Event):void {
            trace('wtf! setupou os opetieons');
            var options:Object = Object(ldr.content).embedOptions;
            //Set example options here
            options.columns = 5;
            options.rows = 5;    
            options.useReloadButton = false;
            options.bkgndTransparent = true;
            options.useFlickr = false;
            options.xmlURL = "gallery.xml";
            options.maxJPGSize = 640;
            options.bkgndTransparent = true;    
        }
        
    }

And the Site.fla -> Use Site.as as Main Class

package lib {
    import away3d.cameras.Camera3D;
    import away3d.containers.ObjectContainer3D;
    import away3d.containers.Scene3D;
    import away3d.containers.View3D;
    import away3d.core.base.Object3D;
    import away3d.core.math.Number3D;
    import away3d.core.render.Renderer;
    import away3d.events.LoaderEvent;
    import away3d.events.MouseEvent3D;
    import away3d.loaders.Collada;
    import away3d.loaders.Object3DLoader;
    import away3d.materials.MovieMaterial;
    
    import com.ezoom.components.DynamicLoader.DynamicLoader;
    import com.ezoom.engine3D.extended.FollowPlane;
    
    import flash.display.Loader;
    import flash.display.MovieClip;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.events.ProgressEvent;
    import flash.filters.BlurFilter;
    import flash.net.NetConnection;
    import flash.system.ApplicationDomain;
    import flash.ui.Mouse;
    import flash.utils.Dictionary;
    import flash.utils.setInterval;
    
    import gs.easing.Quad;
    import gs.TweenMax;
    public class Site extends MovieClip{
        public function Site() {
                    //Here initialize the listeners and the away3D scene 
                    //and then load the Galery.swf (and the only when the user press some button in the scene I'll show the viewer.
        }
         //...
    }

}

In this Class I use away3D with another 3D elements. I don't know why this doesn't work.


PS:The erros are only shown when my away3D scene do the render.


Edit:
If I run the Galery.swf the galery Works just fine. These problems occur just when I try to use with Site.swf

Last edited by iuri.andreazza (2009-09-17 12:29:22)

Re: Error Embed Tiltviewer-Pro

well, I made up a working (or better, NOT working) example.

Error: VerifyError: Error #1053: Illegal Substitution of movePivot in away3d.containers.ObjectContainer3D.
               at flash.display::MovieClip/nextFrame()
               at Preloader/onEnterFrame()

package lib {
    
    import away3d.cameras.Camera3D;
    import away3d.containers.Scene3D;
    import away3d.containers.View3D;
    import flash.utils.setInterval;
    
    import flash.display.*;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.net.URLRequest; 
    
    public class Colecao extends MovieClip {
        
        var ldr:Loader = new Loader();
        var sceneFromParentSWF:Scene3D;
        
        public function Colecao():void {
            if (stage) {
                this.init();
            }else {
                this.addEventListener(Event.ADDED_TO_STAGE, this.init);
            }
        }
        
        public function init(e:Event = null):void {
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align     = StageAlign.TOP_LEFT;
            
            addChild(ldr);
            var url:String = "TiltViewer.swf";
            var urlReq:URLRequest = new URLRequest(url);
            ldr.load(urlReq);
            
            ldr.contentLoaderInfo.addEventListener(Event.INIT, setOptions);
            ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completou);
        }
        
        
        public function setOptions(e:Event):void {
            var options:Object = Object(ldr.content).embedOptions;
            //Set example options here
            options.columns = 5;
            options.rows = 5;    
            options.useReloadButton = false;
            options.bkgndTransparent = true;
            options.useFlickr = false;
            options.xmlURL = "gallery.xml";
            options.maxJPGSize = 740;
        }
        
        public function completou(e:Event = null):void {
            //setInterval(this.doRender, 10);
        }
        
        
        public function set3DEnv(sc:Scene3D, vw:View3D, cam:Camera3D):void { 
            this.sceneFromParentSWF = new Scene3D();
        }
        public function doRender():void { 
            var obj:Object = (this.ldr.content as Object);
            obj.doRender();
        }
        public function removeChild3DScene():void {}
        
    }
}

Someone??

Re: Error Embed Tiltviewer-Pro

so nothing? where is everyone? neutral

Re: Error Embed Tiltviewer-Pro

I'm guessing there is a conflict between the version of Away3d you are using and the one that TiltViewer uses. TiltViewer uses v3.3.3. What version are you using?

Felix Turner
SimpleViewer Support Team.

Re: Error Embed Tiltviewer-Pro

v3.4.0

but I downgraded to version 3.3.3 (downloaded from Away3D site) and still I got the same error.

oohh man,what the h...

Re: Error Embed Tiltviewer-Pro

I haven't tried using TiltViewer loaded into a SWF that uses Away3D, so I'm not sure what the issue is.

Does the code work when TiltViewer is not loaded?

Felix Turner
SimpleViewer Support Team.

Re: Error Embed Tiltviewer-Pro

yep, and if you comment these parts of my code

public function set3DEnv(sc:Scene3D, vw:View3D, cam:Camera3D):void { 
  this.sceneFromParentSWF = new Scene3D();
}

and

var sceneFromParentSWF:Scene3D;

it will work fine, just putting a variable using the Scene3D, View3D or Camera3D it's enough to broke the execution of the galery.

=\

to run a test, create a test.fla, put the lib.Colecao as MainClass and put Colecao.as under the folder lib and you will see the problem.