ReferenceError: Error #1056: Não é possível criar a propriedade url de String.

  • why my hotspot doesn´t appear people please?

    my as3 code:


    var spotname:String = "spot1";
    _krPano.call("addhotspot(" + spotname + ")");
    var spot:Object = _krPano.get("hotspot["+ spotname + "]");
    spot.url = _urlImage;
    spot.ath = 300;
    spot.atv = 300;
    spot.onclick = function():void{ _krPano.call("showlog()"); _krPano.trace(1,"spot clicked..."); };

  • Hi,

    can you provide more informations or a link to the example?

    the posted code itself looks okay,

    are there any errors?
    e.g. loading errors? (wrong path?)
    or do you additionally load an other pano or scene? (here the hotspot could become removed without keep=true)

    --- one more thing:

    regarding to the error message:
    ReferenceError: Error #1056: Não é possível criar a propriedade url de String.

    translated to English (by Google Translate):
    ReferenceError: Error # 1056: Cannot create property String url.

    it seems that the "spot" Object is a String and not an Object you were trying to add the "url" property,
    to leads to the question - what krpano version are you using? and/or what version was set in the xml?
    (in krpano version 1.0.5 and below the get() function was always returning Strings and when the version is set to "1.0.5" or lower then this will also happen for backward-compatibility)

    best regards,
    Klaus

  • hi Klaus,

    the version is 1.0.8.12!

    was talking with my team and decided to create the hotspot at the krpano.xml. Would I have to set something in the as3 code?

    my code in xml is:


    <hotspot name="spot1"
    url="images/cruzeiro.png"
    ath="450" atv="450"
    keep="false"
    visible="true" enabled="true" handcursor="true" capture="true" children="true"
    zorder="100"
    />
    but the hotSpot don´t appear...

  • in my xml:


    <hotspot name="text1" visible="true" zorder="20" url="spotimage.png" ath="335" atv="-2" scale="0.3" zoom="false" onhover="showtext(Clique aqui....);" onover="tween(scale,0.5);" onout="tween(scale,0.3); />

    but the hotspot don´t appears

    someboby help me?

  • still don´t appearing


    <hotspot name="text1"
    visible="true"
    keep="true"
    zorder="20"
    url="spotimage.png"
    ath="335"
    atv="-2"
    scale="0.3"
    zoom="false"
    onhover="showtext(Clique aqui....);"
    onover="tween(scale,0.5);"
    onout="tween(scale,0.3);"/>

  • Hi,

    <krpano version="1.0.8" ispartialpano="true">

    please post a link to the example where the Flash errors happens...
    it's very strange!
    I think there must be anywhere a version setting (can be in any xml file) with a too old version number...


    still don´t appearing

    here too - please post an example - with the posted code itself it's impossible to say what is wrong...

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!