Topic: Simpleviewer Pro and autoplay

Hi there, I can't seem to figure out how to get the autoplay to work in simpleviewer pro v1.9. I downloaded the new version (1.9) and I've edited the options.as file, and it's currently set to the following:

class com.airtightinteractive.apps.viewers.simpleViewer.Options {
        
    function Options(){};
    
    //General
    static var fixedLayout:Boolean = false; //Whether to used fixed layout of stage elements, or dynamic resizing based on browser window size          
    static var preloadImages:Boolean = true; //Whether to automatically preload images in the background 
    static var useSmoothing:Boolean = true; //Whether to smooth images
    static var enableMouseWheel:Boolean = true; //Whether to accept mouse wheel input to navigate images
    static var enableLooping:Boolean = true; //Whether navigating beyond last image goes back to first image    
    static var soundPath:String = null; //Relative or absolute path to optional music mp3 file.
        
    //Main Image    
    static var enableImageDownScaling:Boolean = false; //Whether images are resized smaller to fit stage (not used if fixedLayout == true)
    static var enableImageButtons:Boolean = true; //Whether to use image navigation buttons (arrow buttons that overlay the main image)
    static var hideImageButtonsOnRollOut:Boolean = false; //Whether to hide the image navigation buttons when the mouse is not rolled over them
    static var imageFadeLength:Number = 5; //Image fade tween length (frames)
    static var imageVAlign:String = "center"; //Vertical placment of the image within the square image area. Can be "center", "top" or "bottom".
    static var imageHAlign:String = "center"; //Horizontal placement of the image within the square image area. Can be "center", "left" or "right".
    
    //Thumbnails
    static var thumbnailWidth:Number = 65; //pixels
    static var thumbnailHeight:Number = 65; //pixels    
    static var thumbnailPadding:Number = 14; //space between thumbs (pixels)
    static var showThumbnailVisited:Boolean = true; //Whether to show visited dogear icon
    static var showThumbnailLoadBar:Boolean = true; //Whether to show load bar on image load
    static var thumbnailFrameWidth:Number = 2; //pixels
    static var thumbnailRollOverFrameWidth:Number = 5;     //pixels
    static var thumbnailSelectedFrameOffset:Number = 3; //pixels that thumb frame is offset  when thumb is selected
    static var thumbnailLoadBarHeight:Number = 10; //pixels
    static var thumbnailClickShift:Number = 2;     //distance thumbnail moves on click (pixels)
    static var thumbnailLoadingAlpha:Number = 60; //alpha of thumbnail while image loads (percent)
    static var thumbnailMotionLength:Number = 20; //Thumb paging slide animation tween time (frames)
                                
    //Captions
    static var showCaptions:Boolean = true; //Whether to show Image Captions    
    static var showTitle:Boolean = false; //Whether to show gallery title
    static var showCaptionOnRollover:Boolean = false; //Whether to show the image caption on thumbnail rollover
    static var captionUnderThumbs:Boolean = true; //Whether to show the captions under the thumbnails or the main image
    static var captionFontSize:Number = 13;
    static var titleFontSize:Number = 16;    
    static var captionPadding:Number = 14; //space between image and caption. Used if 'captionUnderThumbs' is false
    
    //Autoplay
    static var enablePlayButton:Boolean = true; //Whether to show play button for autoplay mode.
    static var playAtStart:Boolean = true; //Whether to automatically start playing.
    static var displayTime:Number = 5; //Number of seconds each image will display in autoplay mode.    
    
    //Back Button
    static var showBackButton:Boolean = false; //Whether to show optional back button
    static var backButtonText&#58;String = "<b>&lt; <u>Back</b></u>"; //Display text for optional back button
                            
    //Colors
    //If these are not set, color are loaded from XML options
    //Color values are hex-numbers like this&#58; 0xFF00FF
    static var imageFrameColor&#58;Number = null; //color of main image frame and image nav buttons &#40;overrides XML 'frameColor' value&#41;
    static var thumbnailFrameColor&#58;Number = null; //color of thumbnail frames    &#40;overrides XML 'frameColor' value&#41;
    static var pagingArrowsColor&#58;Number = null; //color of thumbnail paging arrows &#40;overrides XML 'frameColor' value&#41;
    static var captionTextColor&#58;Number = null; //color of captions text &#40;overrides XML 'textColor' value&#41;
    static var titleTextColor&#58;Number = null; //color of title text &#40;overrides XML 'textColor' value&#41;
    
    //Fixed Layout Positions
    //These options are only used if 'fixedLayout' is set to true
    //ThumbArea width and Height are determined by columns, rows, thumbnailWidth, thumbnailHeight and thumbnailPadding
    static var imageAreaX&#58;Number = 10; //X posn of Image Area
    static var imageAreaY&#58;Number = 10; //Y posn of Image Area
    static var imageAreaWidth&#58;Number = 480; //width of Image Area
    static var imageAreaHeight&#58;Number = 480; //height of Image Area    
    static var thumbAreaX&#58;Number = 500; //X posn of Thumb Area
    static var thumbAreaY&#58;Number = 10; //Y posn of Thumb Area         
    static var backThumbArrowX&#58;Number = 0; //X posn of Back Thumb Arrow &#40;relative to top left of Thumb Area&#41;
    static var backThumbArrowY&#58;Number = 350; //Y posn of Back Thumb Arrow &#40;relative to top left of Thumb Area&#41;
    static var nextThumbArrowX&#58;Number = 200; //X posn of Next Thumb Arrow &#40;relative to top left of Thumb Area&#41;
    static var nextThumbArrowY&#58;Number = 350; //Y posn of Next Thumb Arrow &#40;relative to top left of Thumb Area&#41;    
    static var titleX&#58;Number = 10; //X posn of Title text
    static var titleY&#58;Number = 500; //Y posn of Title text
    static var titleWidth&#58;Number = 480; //width of Title text
    static var titleHeight&#58;Number = 20; //height of Title text        
    static var captionX&#58;Number = 10; //X posn of Title text
    static var captionY&#58;Number = 520; ///Y posn of Title text
    static var captionWidth&#58;Number = 480; //width of Title text
    static var captionHeight&#58;Number = 50; //height of Title text    
    static var downLoadLinkX&#58;Number = 600; //X posn of download link
    static var downloadLinkY&#58;Number = 600; //Y posn of download link
    static var backButtonX&#58;Number = 20; //X posn of optional back button
    static var backButtonY&#58;Number = 20; //Y posn of optional back button
    
    //XML Options Overrides
    //Setting these values will replace the values loaded from the XML doc
    static var maxImageWidth&#58;Number = null;
    static var maxImageHeight&#58;Number = null;
    static var frameWidth&#58;Number = null;
    static var stagePadding&#58;Number = null;
    static var navPadding&#58;Number = null;
    static var thumbnailColumns&#58;Number = null;
    static var thumbnailRows&#58;Number = null;
    static var navPosition&#58;String = null;  
    static var vAlign&#58;String = null;
    static var hAlign&#58;String = null;    
    static var title&#58;String = null;
    static var enableRightClickOpen&#58;Boolean = null; 
    static var backgroundImagePath&#58;String = null;     
    static var imagePath&#58;String = null;  
    static var thumbPath&#58;String = null;    
&#125;

As yo ucan see, I've set the 'enablePlayButton:Boolean' and 'playAtStart:Boolean' to true. I even deleted the file 'viewer.swf' in the 'web' folder, and republished the 'simpleviewer.fla' file in the 'source' folder. This re-created the 'viewer.swf' file fine, but it's just not autoplaying. Is there something I've missed?

Thanks for any help.

Stu

Re: Simpleviewer Pro and autoplay

Your options file looks correct. Check that you are editing the correct copy of that file realtive to the FLA location. Are you  clearing your browser cache?

You could also try unzipping the files and starting from scratch.

Felix Turner
SimpleViewer Support Team.

Re: Simpleviewer Pro and autoplay

Hi there,

Thanks for that felix, I deleted all the files and re-extracted them. I've tried the newly extracted swf (after modifying the Options.as file and re-publishing) in IE, Firefox, Opera, Safari and Flock! But it just won't autoplay in any of them, it's very odd. It doesn't even display any extra buttons, such as the Play button or the Pause button. I'm not sure what else to try?

Oh, and also the .fla file I'm editing is in the 'source' folder, and the publlish settings definitely say '..webviewer.swf' and I also tested to make sure by making the pictures dimensions a silly size in the 'Options.as' file, and after publishing, the picture sizes had changed, but the autoplay had not sad

Any advice would be greatly appreciated!

Thanks,

Stu sad  sad  sad

Re: Simpleviewer Pro and autoplay

This is odd. do you see any errors when you publish your swf? is the swf online somewhere?

Felix Turner
SimpleViewer Support Team.

Re: Simpleviewer Pro and autoplay

Hi felix,

Thanks for your reply! There were no errors at all when publishing the swf, however I tried compiling the flash on another computer and it works fine. There must be something corrupted in my copy of flash on this computer, I'll get round to reinstalling it sometime and see if that helps! But I have a working copy compiled on my other computer.

Thanks anyhoo!

Stu

Re: Simpleviewer Pro and autoplay

Hello,

I am running into the same problem getting autoplay to work properly. I have a swf movie that is trying to use fixed layout as well as autoplay; are there any conflicts doing this?

The current swf movie is posted at the front page of marknelsonphotography dot com.

Below is are the Options.as settings currently being used (the .fla file has not been edited from the default.)

Thanks in advance for any help.

Best,
Clayton

class com.airtightinteractive.apps.viewers.simpleViewer.Options &#123;
        
    function Options&#40;&#41;&#123;&#125;;
    
    //General
    static var fixedLayout&#58;Boolean = true; //Whether to used fixed layout of stage elements, or dynamic resizing based on browser window size          
    static var preloadImages&#58;Boolean = true; //Whether to automatically preload images in the background 
    static var useSmoothing&#58;Boolean = true; //Whether to smooth images
    static var enableMouseWheel&#58;Boolean = true; //Whether to accept mouse wheel input to navigate images
    static var enableLooping&#58;Boolean = true; //Whether navigating beyond last image goes back to first image    
    static var soundPath&#58;String = null; //Relative or absolute path to optional music mp3 file.
        
    //Main Image    
    static var enableImageDownScaling&#58;Boolean = true; //Whether images are resized smaller to fit stage &#40;not used if fixedLayout == true&#41;
    static var enableImageButtons&#58;Boolean = false; //Whether to use image navigation buttons &#40;arrow buttons that overlay the main image&#41;
    static var hideImageButtonsOnRollOut&#58;Boolean = true; //Whether to hide the image navigation buttons when the mouse is not rolled over them
    static var imageFadeLength&#58;Number = 5; //Image fade tween length &#40;frames&#41;
    static var imageVAlign&#58;String = "top"; //Vertical placment of the image within the square image area. Can be "center", "top" or "bottom".
    static var imageHAlign&#58;String = "left"; //Horizontal placement of the image within the square image area. Can be "center", "left" or "right".
    
    //Thumbnails
    static var thumbnailWidth&#58;Number = 78; //pixels
    static var thumbnailHeight&#58;Number = 78; //pixels    
    static var thumbnailPadding&#58;Number = 13; //space between thumbs &#40;pixels&#41;
    static var showThumbnailVisited&#58;Boolean = false; //Whether to show visited dogear icon
    static var showThumbnailLoadBar&#58;Boolean = true; //Whether to show load bar on image load
    static var thumbnailFrameWidth&#58;Number = 0; //pixels
    static var thumbnailRollOverFrameWidth&#58;Number = 5;     //pixels
    static var thumbnailSelectedFrameOffset&#58;Number = 0; //pixels that thumb frame is offset  when thumb is selected
    static var thumbnailLoadBarHeight&#58;Number = 7; //pixels
    static var thumbnailClickShift&#58;Number = 2;     //distance thumbnail moves on click &#40;pixels&#41;
    static var thumbnailLoadingAlpha&#58;Number = 60; //alpha of thumbnail while image loads &#40;percent&#41;
    static var thumbnailMotionLength&#58;Number = 20; //Thumb paging slide animation tween time &#40;frames&#41;
                                
    //Captions
    static var showCaptions&#58;Boolean = true; //Whether to show Image Captions    
    static var showTitle&#58;Boolean = false; //Whether to show gallery title
    static var showCaptionOnRollover&#58;Boolean = false; //Whether to show the image caption on thumbnail rollover
    static var captionUnderThumbs&#58;Boolean = false; //Whether to show the captions under the thumbnails or the main image
    static var captionFontSize&#58;Number = 14;
    static var titleFontSize&#58;Number = 16;    
    static var captionPadding&#58;Number = 14; //space between image and caption. Used if 'captionUnderThumbs' is false
    
    //Autoplay
    static var enablePlayButton&#58;Boolean = true; //Whether to show play button for autoplay mode.
    static var playAtStart&#58;Boolean = true; //Whether to automatically start playing.
    static var displayTime&#58;Number = 3; //Number of seconds each image will display in autoplay mode.    
    
    //Back Button
    static var showBackButton&#58;Boolean = false; //Whether to show optional back button
    static var backButtonText&#58;String = "<b>&lt; <u>Back</b></u>"; //Display text for optional back button
                            
    //Colors
    //If these are not set, color are loaded from XML options
    //Color values are hex-numbers like this&#58; 0xFF00FF
    static var imageFrameColor&#58;Number = null; //color of main image frame and image nav buttons &#40;overrides XML 'frameColor' value&#41;
    static var thumbnailFrameColor&#58;Number = null; //color of thumbnail frames    &#40;overrides XML 'frameColor' value&#41;
    static var pagingArrowsColor&#58;Number = null; //color of thumbnail paging arrows &#40;overrides XML 'frameColor' value&#41;
    static var captionTextColor&#58;Number = null; //color of captions text &#40;overrides XML 'textColor' value&#41;
    static var titleTextColor&#58;Number = null; //color of title text &#40;overrides XML 'textColor' value&#41;
    
    //Fixed Layout Positions
    //These options are only used if 'fixedLayout' is set to true
    //ThumbArea width and Height are determined by columns, rows, thumbnailWidth, thumbnailHeight and thumbnailPadding
    static var imageAreaX&#58;Number = 0; //X posn of Image Area
    static var imageAreaY&#58;Number = 0; //Y posn of Image Area
    static var imageAreaWidth&#58;Number = 884; //width of Image Area
    static var imageAreaHeight&#58;Number = 588; //height of Image Area    
    static var thumbAreaX&#58;Number = 910; //X posn of Thumb Area
    static var thumbAreaY&#58;Number = 0; //Y posn of Thumb Area         
    static var backThumbArrowX&#58;Number = 0; //X posn of Back Thumb Arrow &#40;relative to top left of Thumb Area&#41;
    static var backThumbArrowY&#58;Number = 260; //Y posn of Back Thumb Arrow &#40;relative to top left of Thumb Area&#41;
    static var nextThumbArrowX&#58;Number = 854; //X posn of Next Thumb Arrow &#40;relative to top left of Thumb Area&#41;
    static var nextThumbArrowY&#58;Number = 260; //Y posn of Next Thumb Arrow &#40;relative to top left of Thumb Area&#41;    
    static var titleX&#58;Number = 0; //X posn of Title text
    static var titleY&#58;Number = 0; //Y posn of Title text
    static var titleWidth&#58;Number = 884; //width of Title text
    static var titleHeight&#58;Number = 28; //height of Title text        
    static var captionX&#58;Number = 0; //X posn of Title text
    static var captionY&#58;Number = 602; ///Y posn of Title text
    static var captionWidth&#58;Number = 884; //width of Title text
    static var captionHeight&#58;Number = 56; //height of Title text    
    static var downLoadLinkX&#58;Number = 600; //X posn of download link
    static var downloadLinkY&#58;Number = 600; //Y posn of download link
    static var backButtonX&#58;Number = 20; //X posn of optional back button
    static var backButtonY&#58;Number = 20; //Y posn of optional back button
    
    //XML Options Overrides
    //Setting these values will replace the values loaded from the XML doc
    static var maxImageWidth&#58;Number = null;
    static var maxImageHeight&#58;Number = null;
    static var frameWidth&#58;Number = null;
    static var stagePadding&#58;Number = null;
    static var navPadding&#58;Number = null;
    static var thumbnailColumns&#58;Number = null;
    static var thumbnailRows&#58;Number = null;
    static var navPosition&#58;String = null;  
    static var vAlign&#58;String = null;
    static var hAlign&#58;String = null;    
    static var title&#58;String = null;
    static var enableRightClickOpen&#58;Boolean = null; 
    static var backgroundImagePath&#58;String = null;     
    static var imagePath&#58;String = null;  
    static var thumbPath&#58;String = null;    
&#125;

Re: Simpleviewer Pro and autoplay

I just tested the 2 'options.as' files posted above and they worked on my machine. The play/pause button displayed on rollover, and the slideshow started on load.

My guess is that you are somehow referencing an old version of the code when you are publishing your swf.

Check your Flash global classpath list: Edit->Preferences->ActionScript->ActionScript 2.0 Settings... Check if there is a reference to an old version of the code in here. If so remove it.

Try re-downloading the latest version of SV-Pro to a new folder. Edit 'options.as' to enable autoplay. Publish the swf. Check if you get any errors in the output window on publish.

Felix Turner
SimpleViewer Support Team.

Re: Simpleviewer Pro and autoplay

Hi Felix,

Thanks for your response. I checked my Actionscript 2.0 preferences and they're set to -

.
$&#40;UserConfig&#41;/Classes

Which is the same settings that show up when I hit the 'Reset to defaults' button.

I re-downloaded SV-Pro and walked through my earlier settings bit by bit and now everything seems to work (using the exact settings in both the Options.as and XML file as before.)

I'm definitely happy it's working but I have no idea what changed. :?

I think I re-downloaded the source files before when trying to get this to work so I'm not sure what changed this time around.

Best,
Clayton

Re: Simpleviewer Pro and autoplay

Hi there,
I have a problem with the autoplay option. When I press the play button to play the slideshow, it won't wait for the image to load, it just goes to the next image anyway, so it never displays the picture.
I need a function that will work like this:
If I have the delay lets say 5 sec. First it will load the image then it will start counting.
Is this possible?