Tour funktioniert in Flash, aber nicht in HTML5

  • Hallo,


    ich habe ein Problem.
    Und zwar habe ich eine Tour gebaut, die in Flash funktioniert, aber in HTML5 (getestet,indem ich in Safari unter Einstellungen "alle anderen Plugins erlauben" deaktiviert habe) die XML nicht lädt (Schwarzes Fenster (Loading or Parsing failed)

    Ursprung war eine Tour, die ich mit dem maketour-Droplet erzeugt habe. Die Navigation dieser Tour habe ich rausgenommen, und dann eigene Buttons und Navimaps eingefügt.
    Ich habe gerade alte und neue Versionen verglichen, und kann benennen, mit welchen Codezeilen es Probleme gibt.
    Dankbar wäre ich, wenn mir jemand sagen kann, wie ich das ganze in HTML5 zum Laufen kriege.


    Also, in meiner tour.xml habe ich eigene Buttons gesetzt. Das geht mit allen Buttons, aber nicht mit dem Autorotations-Button.
    Wenn der drin ist, kommt gleich schwarzes Fenster Fatal Error.
    Hier seine Code-Zeile:

    <plugin name="rotate" url="buttons/button_rotate_off.png"onhover="showtext('Autorotation',hotspottextstyle);" align="left" x="240" onclick="switch(plugin[rotate].url,skin/btn_stop.png,skin/btn_rotate.png);switch(autorotate.enabled);" keep="true" />

    Das zweite Problem sind die Navimaps. Ich habe die in eine eigen XMLs ausgelagert, welche ich innerhalb der Scene mit
    <include url="navimap1.xml"/>
    aufrufe.

    In Flash geht alles gut.

    In HTML5 gibt habe ich sofort wieder ein Schwarzes Fenster mit Loading or Parsing Failed, wenn ich folgende Codezeile innerhalb der navimap1.xml belasse:

    <!-- activatespot action - %1 = the current spot, %2 = the current radar heading -->
    <action name="activatespot">
    <!-- copy the spot position to the radar and activespot position -->
    copy(layer[radar].x, layer[%1].x);
    copy(layer[radar].y, layer[%1].y);
    copy(layer[activespot].x, layer[%1].x);
    copy(layer[activespot].y, layer[%1].y);

    <!-- set the radar heading -->
    set(layer[radar].heading, %2);

    <!-- show the radar and the activespot -->
    set(layer[radar].visible, true);
    set(layer[activespot].visible, true);
    </action>


    Wenn ich diese Zeilen weglasse, startet die Tour in HTML5 zwar, es wird jedoch überhaupt gar keine Navimap angezeigt.
    Ich poste hier noch mal eine (um einige Wiederholungen gekürze) komplette Navimap


    <!-- the image map -->

    <layer name="mapcontainer" keep="false" type="container" bgcolor="0x000000" bgalpha="0.3" align="middletop" x="0" y="5" width="808" height="125">

    <layer name="wg1" url="buttons/button_1_on.png" align="lefttop" x="4" y="10" width="100" height="16" onclick="loadscene(scene_2, null, MERGE, BLEND(1));"> </layer>

    <layer name="wg2" url="buttons/button_2_off.png" align="lefttop" x="104" y="10" width="100" height="16" onclick="loadscene(scene_6, null, MERGE, BLEND(1));"> </layer>




    <layer name="map" url="skin/w1.png" align="lefttop" x="4" y="40" width="800" height="80" handcursor="false">
    <!-- radar mask container -->
    <layer name="radarmask" type="container" align="lefttop" width="100%" height="100%" maskchildren="true">


    <!-- radar plugin (zoder=1 and hidden at start) -->
    <layer name="radar" visible="false"
    url="plugins/radar.swf" alturl="plugins/radar.js"
    align="lefttop" edge="center" zorder="1"
    scale="1.0"
    fillcolor="0xFFFFFF" fillalpha="0.4"
    linecolor="0xFF0000" linewidth="0.5" linealpha="0.5"
    headingoffset="0"
    />


    <!-- the spots (zorder=2) -->
    <layer name="spot1" url="skin/mappoint.png" onhover="showtext('Infotext',mapspottextstyle);" align="lefttop" edge="center" x="80" y="40" zorder="2" onclick="loadscene(scene_1, null, MERGE, BLEND(1));" />
    <layer name="spot2" url="skin/mappoint.png" onhover="showtext('infotext2)',hotspottextstyle);" align="lefttop" edge="center" x="355" y="40" zorder="2" onclick="loadscene(scene_2, null, MERGE, BLEND(1));" />

    <!-- activated spot image (zorder=3 and hidden at start) -->
    <layer name="activespot" url="skin/mappointactive.png" align="lefttop" edge="center" zorder="3" visible="false" />
    </layer>
    </layer>
    </layer>


    <!-- activatespot action - %1 = the current spot, %2 = the current radar heading -->
    <action name="activatespot">
    <!-- copy the spot position to the radar and activespot position -->
    copy(layer[radar].x, layer[%1].x);
    copy(layer[radar].y, layer[%1].y);
    copy(layer[activespot].x, layer[%1].x);
    copy(layer[activespot].y, layer[%1].y);


    <!-- set the radar heading -->
    set(layer[radar].heading, %2);


    <!-- show the radar and the activespot -->
    set(layer[radar].visible, true);
    set(layer[activespot].visible, true);
    </action>


    Ich sitze mal wieder seit ein paar Stunden davor, und würde ich freuen, wenn mit jemand mit einem Ansatz helfen könnte, wie ich weiterkomme.

    Einmal editiert, zuletzt von flow (2. August 2013 um 02:48)

  • Moin

    HTML5 ist wesentlich strikter bei der Interpretation der XML Konstruktionen als Flash. Öffne doch einfach mal Deine XML Dateien im Browser, meist bekommt man dann schon einen Hinweis wo es hapert.

    Viele Erfolg
    Peter

Jetzt mitmachen!

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