WordPress.org

Forums

NextGEN Monoslideshow javascript control (2 posts)

  1. quiraang
    Member
    Posted 4 years ago #

    I have installed NextGen Gallery and Monoslideshow and the they both work very nicely. However I need to add some custom controls to the page using javascript and that's where I'm having the problem.

    I can't seem to reconcile the examples given in the Monoslideshow manual with the way Alex has implemented it on WordPress. Whatever I try, I get 'swf.addListener is not a function', or 'swf.nextImage is not a function'.
    I have even tried modding the plugin to add the param - allowScriptAccess : "always" - param appears but makes no difference.

    Obviously my javascript skills ain't as good as I thought - what else do I need to do to access the javascript methods and events?

  2. quiraang
    Member
    Posted 4 years ago #

    Sorry forgot to add my code:

    <script>
    		var swf;
    		swf = jQuery("monoslideshow");
    		alert(swf);
    		swf.addListener("itemLoaderComplete", "onItemLoaderComplete");
    
    		function onItemLoaderComplete(event) {
    		alert("item loaded");
    		}
    		function previousImage() {
    		swf.previousImage();
    		}
    
    		function nextImage() {
    		swf.nextImage();
    		}
    		function initializeMonoslideshow() {
    		swf = document.getElementById("monoslideshow");
    		}
    	</script>

    The alert(swf); returns an object - but obviously not the correct one ?

Topic Closed

This topic has been closed to new replies.

About this Topic