1

(8 replies, posted in SimpleViewer-Pro v1)

kilsam wrote:

I display video along with pictures using simpleviewer by renaming my swf file to a jpg file in the image folder and adding a still image in the thumbs folder. it works like a charm.

Hi,

It works, thank you.

I hope this could help   :

1. upload an image (ie : mysample.JPG) in the images folder
2. run /SimpleViewerAdmin.php in order to create the thumb of mysample.JPG
3. use Super (freeware) to transfer from video (ie:mpg or avi or flv) to swf, ie : myvideo.swf
4. upload your video in swf format in /images
5. modify the SWF file name, ie : myvideo.swf -> mysample.JPG

Then you can check that your video is running inside the frame, when you select it.

But there are some problems and we have to customized one ActionScript file.

1. When you click on an other thumb, the video will still run in background.
In file Image.as,

find :
    function hideImage(){
and add this :   
        mClip_mc.loader.gotoAndStop(1); // swf stopped when leaving image

2. Then when you select back the video, the video doesn't start.
In file Image.as,

find : 
    function showImage(){
and add this :
        mClip_mc.loader.play();   // swf plays after been stopped

3. The most important is that the swf is played during its loading even if the video isn't selected.

You can deselect image preloading in Option.as :

find :        
    static var preloadImages:Boolean = true; //Whether to automatically preload images in the background

and replace true by false

But it's the worst solution and we could try to stop the SWF.

In Image.as,

at the list of "private var", add this :

    private var mclListener:Object = new Object();

then find :

    public function loadImage(loadNextonDone:Boolean){

and add this :

        mLoader_mcl.addListener(mclListener);
        mclListener.onLoadInit = function(mLoader_mc) {
            mLoader_mc.gotoAndStop(1);     // swf stopped at first frame
        };

The .swf is stopped at the first frame but after the loading is completed. In fact the .swf file is executed during the download. It is invisible and the sounds can be eared during this time.

My .swf begins with a very loud noise, and I am looking for a better solution.
I am not an expert and ideas are welcome !