Topic: Javascript control ?

Hi all, I searched for informations in the forum but I didn't found any infos about that : is there a way to control Autoviewer via Javascript ?
It could be very useful to start, forward or rewind with HTML/Javascript...

Thanks.  :D

Re: Javascript control ?

I've been searching for the same exact thing.

Well.. we're able to use JavaScript functions to control Flash movies, so I don't see why we couldn't apply this to AutoViewer. Some Examples:

www permadi com/tutorial/flashjscommand/

anotherblog spaces live com/Blog/cns!E9C5235EBD2C699D!202.entry

So, can we control autoviewer.swf using JavaScript functions? I need this to use links outside of the embedded autoviewer so that each link could jump to a specific image on in the slideshow.


Will much appreciate any type of response...Thanks[/code]

Re: Javascript control ?

Can one use JavaScript to call and control this function in Am I headed in the right direction in trying to control AV via Javascript?

Function found in

    private function onKeyDown() {   
        if(Key.isDown(Key.LEFT)) {
        }else if(Key.isDown(Key.RIGHT)) {
        }else if(Key.isDown(Key.HOME)) {
        }else if(Key.isDown(Key.END)) {
        }else if(Key.isDown(Key.SPACE)) {

Re: Javascript control ?

I'm looking to get something like:

<a href="#" onclick="showPrev()">Click here to go to previous image.</a>
<a href="#" onclick="showNext()">Click here to go to next image.</a>
<a href="#" onclick="showImage(mImageCount-1)">Click here to skip to the last image in gallery.</a>
<a href="#" onclick="showImage(0)">Click here to go to first image.</a>
<a href="#" onclick="showImage(6);">Click here to skip to the 5th image in gallery.</a>


    function showImage(index:Number,instant:Boolean)....

    function showNext(){
        showImage(mCurrentImageIndex +1);
    function showPrev(){
        showImage(mCurrentImageIndex -1);
    } work. Any thoughts?
Any help will be great!

Re: Javascript control ?

JavaScript support is not built into AutoViewer but it would be fairly easy to add it to AV-Pro. You would use ExternalInterface.addCallback() to allow the AS functions to be called from javascript: … 01653.html

Felix Turner
SimpleViewer Support Team.

Re: Javascript control ?


For most people including myself it's not so easy. Can you show us how this javascript link that allow the AS functions to be called from javascript would look?

Is it necessary to adjust something in the gallery files ?

Thank you.

Re: Javascript control ?

You can connect to JavaScript using geturl() or extermalinterface() in Actionscript 2. A google search will come up with sites giving you examples of how to use them.

Mike Richards
SimpleViewer Support Team.