Fehler beim Hinzufügen eines Hotspots in AS3

Fragen und Antworten zu Pano2VR in deutscher Sprache
Post Reply
vtissen
Posts: 2
Joined: Tue Nov 03, 2009 6:04 pm

Hallo Leute,

habe ein Problem mit dem Setzen eines Hotspots in AS3. Kriege beim kompilieren folgende Fehlermeldung:

TypeError: Error #1010: Ein Begriff ist nicht definiert und hat keine Eigenschaften.
at PanoCube/addHotspot()
at PanoView/initPanorama()


Ich benutze Pano2vr in der Version 2.2.3

Flash Player in der Version 10

Ich kompiliere mit dem "Adobe Flash CS3 Pro"

Meine Klasse sieht so aus:

Code: Select all

package
{
  import flash.display.*;
  import flash.net.URLRequest;
  import flash.events.Event;

  public class PanoView extends Sprite
  {
    var loader:Loader = new Loader();
    var url:String = "pix/pano_final.swf";
    var urlReq:URLRequest = new URLRequest(url);
    var vr:MovieClip; // panorama movieclip

    public function PanoView() {
      // call initPanorama every frame
      addEventListener( Event.ENTER_FRAME , initPanorama);

      // Tell the loader to call 'finished_loading' after the swf is loaded.
      loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finished_loading);
      // Tell the loader to call 'initHandler' after the swf is initialized.
      loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
      loader.load(urlReq);
      addChild(loader); // add your swf directly to the stage
    }

    // This is done after the swf is loaded.
    function finished_loading (e:Event) {
    }

    function initHandler(event:Event):void {
      trace("initHandler: " + event);
      vr = MovieClip(loader.content); // cast 'DisplayObject' to 'MovieClip'
      vr.isFlash10=false; // Disable Flash 10 rendering if the container is Flash 9
    }

    function initPanorama(e:Event) {
    // check if the panorama object is available and initialize it
      if ((vr!=null) && (vr.pano!=null)) {
        removeEventListener( Event.ENTER_FRAME , initPanorama);
        //vr.pano.setWindowSize(200,100); // resize the window
        //vr.pano.setWindowPos(200,200); // reposition
        var hotspotMc:MovieClip = new MovieClip();
        hotspotMc.graphics.lineStyle();
        hotspotMc.graphics.beginFill(0x9900FF, 60);
        hotspotMc.graphics.drawCircle(0, 0, 10);
        hotspotMc.graphics.endFill();
        addChild(hotspotMc);
        vr.pano.addHotspot("h1", 50, -59, hotspotMc);
      }
    }

  }
}
Ich vermute stark, dass ich was falsch mache aber komme nicht darauf :(

Danke im Voraus

Gruß

Vitali
vtissen
Posts: 2
Joined: Tue Nov 03, 2009 6:04 pm

Hallo Leute(Thomas), habe ich ganz blöde Frage gestellt? Wieso kriege ich da keine Antwort darauf? Unter Support für eine KOMMERZIELLE Software verstehe ich was anderes als einfaches Schweigen! Die E-Mail habe ich auch schon versucht! Wenn ich irgendwo ein Fehler gemacht habe würde ein Hinweis helfen. Einfach keine Antwort geben finde ich zumindest unhöflich! Gruß Vitali
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Ich bin leider noch nicht dazu gekommen das ich mir das Problem genauer anschaue. Ich hoffe ich schaffe es noch diese Woche.
MfG, Thomas
Post Reply