1

(2 replies, posted in SimpleViewer-Pro v1)

Why don't you try another editor?
There are plenty of free editors available, which offer nice features like code-highlighting.

Or why don't you open the as-files with flash  :)

Yes, I cleared the cache.
Maybe I have to reinstall the flashplayer.

Hi Felix,

thanx for your reply.
It made me realize that I only tested the website in Firefox 3 on my desktop computer.

Now I have tested the website in IE6, IE7, Opera 9.x and Safari. And in all these browsers everything works like it should.

But in Firefox 3 on my computer the galleryID and so the xml-file is always one step behind.
Now I had a look with Firefox 3 on my laptop and, strange enough, everything's fine.

Do you have any explanation for this mystery?
I mean, since this bug seems to only occur on my computer I do not worry about it any more, but I am quite curious.

Hi everybody,

I'm running a website with multiple galleries. The code I use is adopted from the multiple galleries example. But the website shows an odd behaviour:
The xml-files loaded are always one step behind, and sometimes they do not show up at all without the error message: gallery not found.
Website: http://www.antsandfriends.com


Here's the source code:

stop();


//init stage
Stage.align = "TL"; 
Stage.scaleMode = "noScale";

//set width and height of SimpleViewer swf
_global.SVStageWidth = 720;
_global.SVStageHeight = 435;

var galleryID:String;
var mLoader_mcl = new MovieClipLoader();
mLoader_mcl.addListener(this);

function loadGal(galId){
    galleryID = galId;    
    mLoader_mcl.loadClip("viewer.swf",mcLoader);

// adding a scrollbar depending on the gallery    
    if( galleryID == "firma" || galleryID == "news" || galleryID == "textil" || galleryID == "referenzen" || galleryID == "anfahrt" || galleryID == "impressum" || galleryID == "full") {
_root.attachMovie("scroller", "scroller", 1, {_x:875, _y:260});
        }
    else {
        _root.scroller.unloadMovie();
    }
}


function onLoadInit(){
    
    //set gallery xml name
    _root.xmlDataPath = "xml/"+galleryID + ".xml";
    //set gallery specific options
    if (galleryID == "full" || galleryID == "jobs"){            
    com.airtightinteractive.apps.viewers.simpleViewer.Options.imageAreaWidth = 380; //width of Image Area 
     com.airtightinteractive.apps.viewers.simpleViewer.Options.captionX = 410; //X posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionY = 20; ///Y posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionWidth = 280; //width of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionHeight = 560; //height of Title text    
    
    }else if (galleryID == "team") {
    com.airtightinteractive.apps.viewers.simpleViewer.Options.imageAreaWidth = 380; //width of Image Area 
     com.airtightinteractive.apps.viewers.simpleViewer.Options.captionX = 410; //X posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionY = 170; ///Y posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionWidth = 280; //width of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionHeight = 250; //height of Title text    
    com.airtightinteractive.apps.viewers.simpleViewer.Options.thumbnailColumns = 5; // Anzahl der Thumbnails
    com.airtightinteractive.apps.viewers.simpleViewer.Options.nextThumbArrowX = 250; // Pos next Arrow    
      
    }else if (galleryID == "news" || galleryID == "vip") {
    com.airtightinteractive.apps.viewers.simpleViewer.Options.imageAreaWidth = 450; //width of Image Area 
     com.airtightinteractive.apps.viewers.simpleViewer.Options.captionX = 480; //X posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionY = 20; ///Y posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionWidth = 220; //width of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionHeight = 450; //height of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.thumbnailColumns = 6; // Anzahl der Thumbnails
    com.airtightinteractive.apps.viewers.simpleViewer.Options.nextThumbArrowX = 310; // Pos next Arrow        
     
    } else if (galleryID == "showroom" || galleryID == "gadgets" || galleryID == "onpacks" || galleryID == "textil" || galleryID == "shops" ){            
    com.airtightinteractive.apps.viewers.simpleViewer.Options.imageAreaWidth = 480; //width of Image Area 
     com.airtightinteractive.apps.viewers.simpleViewer.Options.captionX = 500; //X posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionY = 20; ///Y posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionWidth = 190; //width of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionHeight = 560; //height of Title text    
    com.airtightinteractive.apps.viewers.simpleViewer.Options.thumbnailColumns = 7; // Anzahl der Thumbnails
    com.airtightinteractive.apps.viewers.simpleViewer.Options.nextThumbArrowX = 360; // Pos next Arrow
    
    } else if(galleryID == "impressum") {
    com.airtightinteractive.apps.viewers.simpleViewer.Options.imageAreaWidth = 380; //width of Image Area 
     com.airtightinteractive.apps.viewers.simpleViewer.Options.captionX = 405; //X posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionY = 15; ///Y posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionWidth = 290; //width of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionHeight = 820; //height of Title text    
    com.airtightinteractive.apps.viewers.simpleViewer.Options.thumbnailColumns = 5; // Anzahl der Thumbnails
    com.airtightinteractive.apps.viewers.simpleViewer.Options.nextThumbArrowX = 250; // Pos next Arrow    
    } else {
    com.airtightinteractive.apps.viewers.simpleViewer.Options.imageAreaWidth = 380; //width of Image Area 
     com.airtightinteractive.apps.viewers.simpleViewer.Options.captionX = 405; //X posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionY = 15; ///Y posn of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionWidth = 290; //width of Title text
    com.airtightinteractive.apps.viewers.simpleViewer.Options.captionHeight = 760; //height of Title text    
    com.airtightinteractive.apps.viewers.simpleViewer.Options.thumbnailColumns = 5; // Anzahl der Thumbnails
    com.airtightinteractive.apps.viewers.simpleViewer.Options.nextThumbArrowX = 250; // Pos next Arrow
    }
}

The first gallery is loaded with a button.
When I test the swf locally everything works fine. But online I have a mess.
Any idea?
Thanx for your help.

5

(1 replies, posted in SimpleViewer-Pro v1)

now it works, maybe there was a wrong xml-file, or the swf with the wrong xml-file, left in the browser-cache that caused the mistake.

6

(1 replies, posted in SimpleViewer-Pro v1)

Hi again,

my xml-file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<simpleviewergallery>
<image>
<filename>1228649270.jpg</filename>
<caption><![CDATA[ text <a href="http://www.mysite.com/docs/my_file.pdf">my file</a>]]></caption>
</image>
</simpleviewergallery>

But the link does not work. The file I want to link to exists and the path is correct.
Can somebody tell me, what I am doing wrong, please?

Greets Freeflow

Maybe the path to your xml file is not correct.

You can change the path in the preloader MC in the simpleviewer.fla:

//load XM data

//set default xmlPath
var xmlPath = "xml/showroom.xml"

or in the javascript of the index.html:

//fo.addVariable("xmlDataPath", "gallery.xml");

or, if you use multiple galleries within another swf in the code of this swf as it is shown in the examples of simpleviewer (simpleviewer_proexamplesFlash Embed):

function onLoadInit(){
   
    //set gallery xml name
    _root.xmlDataPath = "gallery"+galleryId + ".xml";

And last but not least: you have to set the rights of the directory which contains your xml-files to 755.
OTHERWISE THE SWF CANNOT OPEN THE XML-FILE

8

(3 replies, posted in SimpleViewer v1)

It seems like you embed your gallery in a wrong way.

Try something like:

<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="400" height="300" id="movie" align="">
<param name="movie" value="movie.swf">
<embed src="movie.swf" quality="high" width="400"
height="300" name="movie" align=""
type="application/x-shockwave-flash"
plug inspage="http://www.macromedia.com/go/getflashplayer">
</object>

or

<object type="application/x-shockwave-flash" data="navi.swf" width="440" height="440">
    <param name="movie" value="navi.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#EFF6EE" />
</object>


Further details can be found at:
http://www.alistapart.com/articles/flashsatay/

At http://www.flashkit.com/movies/Interfac … /index.php I found the fla for a scrollbar.

I changed the last two lines to:

    dy = Math.round((top-(top-bottom)*-r)-_root.mcLoader.mcCaption.txtText._y);

        _root.mcLoader.mcCaption.txtText._y += dy;

to access the caption text.

And I changed the vars top and bottom into fixed values.
If I only knew how to get the height of the txtText - field everything would be perfect.

10

(3 replies, posted in SimpleViewer v1)

When I click on your 'work' button the gallery is showing up. But one image is missing and I would recommend to align the gallery on the left of the page, because it overlaps the vertical navigation on the right.

in the ImageArea.as I found

        //image nav hit areas remain same size as imageArea
        mBackBtn.setHitPosn(0,0);
        mBackBtn.setHitSize(mWidth/3+fw,mHeight);       
        mNextBtn.setHitPosn(mWidth*2/3-fw,0);
        mNextBtn.setHitSize(mWidth/3+ fw,mHeight);

in the setSize-function.

So I would suggest to modify these settings. But I am not sure about this.

12

(0 replies, posted in SimpleViewer-Pro v1)

Hi, it's me again

I'm struggeling to use the hight of the caption text.

I'm trying something like:

var myHeight:Number  = _root.mcLoader.mcCaption.txtText.textHeight;

Although the reference is right (it works fine with my srcollbar) 'myHeight' stays always as undefined.

What am I doing wrong?

Thanx in advance.

13

(3 replies, posted in SimpleViewer-Pro v1)

Finally I know now how to add a scrollbar to the caption text.

1. I load various galeries in one main swf, like it is descriped in "simpleviewer_proexamplesFlash Embed".

2. I found a scroller on flashkit.com which I then modified for my own demands and put it in my main swf.

3. The path to the loaded mc where the caption is in: "mcLoader.mcCaption".

Now I am able to scroll the caption text. But when I select another image, the mcCaption does not go back to its original

y-position and the scroller does not go back either.
To make them do what they should I had to modify the Thumb.as and the ImageArea.as

Thumb.as:
Since I use the rollover-effect of the thumbnails I added to lines to the onRollOver-function:

mStageManager.doLayout(); // the recall of this function sets back the mcCaption._y
_root.scroller.dragger._y = 12; // this line brings back the scroller to its original position

ImageArea.as
Here I added the same to lines to the onClickNext-function and onClickBack-function.

I did not search the function which controlls the scroll-wheel of the mouse, so this was all to add a scrollbar to the
caption text.

Hi,

is there any possibility to add a scrollbar to a caption text?

Thanx in advance.

Hi,

add a line like: "if (mXMLManager.imageCount <= 100) return;"
in the ThumbArea.as just below the line "if (mPageSize == 0) return;".

As long as you have less than 100 images in your gallery no thumbnail should be displayed.

Thank you Felix,

now everything works fine.

Hi,

I'm loading different galleries into one flash movie.
So far so good, but the problem is, that I want to have different values for each gallery. Let's say the image size of the 1st is 380x380px and for the 2nd 450x380px, the xvalue for the captions of the 1st gallery might be 200px and for the 2nd 350px and so on.
I manage thes values with the options.as and I copied the simpleviewer folder for each different gallery. And from each folder with its own simpleviewer.fla and its own options.as I created the swf. And on its own each swf represents the values it should have.
But when I load them in another swf the 1st gallery which is loaded overwrites the values of the other galleries although I 'unload' each gallery.swf before I load the next one.
Does anyone know why this happens and even better has anyone an idea to solve this problem.

Thanx in advance

18

(1 replies, posted in SimpleViewer-Pro v1)

I found my mistake:

it is not enough to embed the bold font.
I had to hit the 'bold button' in the propertyinspector as well and then it worked.

19

(1 replies, posted in SimpleViewer-Pro v1)

I found this topic already in the forum, but the answer did not help me, so come up with it again.

Since I load my viewer.swf in another movieclip below a mask, I have to embed the font for the caption text.
This works fine with the regular font, but although I have embedded the bold type too, it is not displayed in the swf.
Then I tried to put another dynamic textarea on the stage and linked the bold text to this area, but the bold text still did not show up.

Thanx for your help.

20

(5 replies, posted in SimpleViewer-Pro v1)

Hi,

to make the catpions change on thumbnail-rollover, just edit the options.as.

Look for: static var showCaptionOnRollover:Boolean = true;

and set it to true as shown above.

That's it