Thumb gallery plugin overriding my XML loader. (solved)

  • I've created a gallery.swf plugin for a strip of thumbs. In my AS3, when I code the progress to show no loading or waiting ... it does just that. But when I click a thumbnail to load a new pano ... it displays the default loader ... and I can't seem to control it.

    Any ideas?

    Say "Hi!" on twitter

    Edited once, last by mds (February 7, 2011 at 4:35 PM).

  • my gallery.swf has a separate xml file (for now) and looks like this:

    Code
    <item>
    	<image>panos/midfield.tiles/mobile_f.jpg</image>
    	<text>Midfield</text>
    	<pano>loadMidfield</pano>
    </item>

    My AS3 for the gallery thumbnail click looks like this:

    Code
    function onMouseClick(e:MouseEvent):void {
    	var link:String = xmlList[e.currentTarget.id].pano;
    	krpano.call("action("+link+")");
    }


    My main XML for the main tour looks like this:

    Code
    <!-- actions for gallery -->
    	<action name="loadMidfield" >
    		loadscene(scene_midfield, null, MERGE, BLEND(1));
    		lookat(0,0,120);
    		wait(blend);
    	</action>

    I fixed the loader issue by handling the pano load with the code above ... but there is still some sort of bug that is causing each thumb to have to be clicked twice in order for the pano to load. Is there any gallery plugin source code around I could check out? Seems to be functioning quite different the full AS3 interface I'm used to.

  • Ok, there was apparently some sort of conflict with the actions I had created for each scene and the global actions for loading the panos via the thumbnails. I changed the global action names and this fixed it.

    In the future I should probably have only global functions for loading panos and use variables to set lookat and lookto for hotspots. *squint*

Participate now!

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