how can i pass some parameters like tagAth and tagAtv to my as3 function from xml?

  • It´s everything ok, but how can i pass some parameters like tagAth and tagAtv to my as3 function?

    Code in xml:


    screentosphere(plugin[tag-tagger].x,plugin[tag-tagger].y,tagAth,tagAtv);
    openContent(tagAth,tagAtv);

    Code in as3:


    private function openContent(x:Number,y:Number):void
    {
    _krPano.call("showlog()"); _krPano.trace(1, "x: "+x+"y: "+y);
    }


    but dont´s have sucess! Can you helpe me please?

    thanks

  • Hi,

    you have sent me the same question also per mail,
    here my answer from mail again:

    this call in xml:
    openContent(tagAth,tagAtv);

    will just pass the two strings "tagAth" and "tagAtv" not the value of the variables!

    to pass the 'value' of a variable you need to use get(),
    e.g.
    openContent(get(tagAth),get(tagAtv));


    or alternatively you can change your as3 function to this and resolve the content there:

    private function openContent(sx:String,sy:String):void
    {
    var x:Number = Number( krpano.get(sx) );
    var y:Number = Number( krpano.get(sy) );
    }


    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!